General C++ Programming (Page 4)

by Cj230
Desperate for Explanation on I/O Assignment
Hello Everyone! I have a programming assignment I have been working on all day. I'm pretty sure I'v...
[3 replies] Last: I have been working on all day So post your code so that we can see... (by seeplus)
by t im
About the upper_bound Function
Edit: In Solution 2, if I use upper_bound function instead of the menber function of multiset, time ...
[3 replies] Last: Thanks for your answers that benefit me. (by t im)
assistance with class code
Hello, been having issues with this program that uses classes. Any help would be appreciated, but pl...
[15 replies] Last: sorry for not responding at all, was in the hospital for 3 days. Here... (by seeplus)
by t im
About the loop condition
In case of the following two for loop: // case 1 for (int i = 0; i < n; i++) something; /...
[3 replies] Last: Thanks for your answers which solve my confusion. (by t im)
does all stream object have buffer except cerr?
I just started learning about stream and I am not quite sure how it works. correct me if I am wr...
[13 replies] Last: To determine if the standard C++ streams are synchronized with the sta... (by JLBorges)
Variadic Template not working expectetly
Dear Community, i cannot figure out how to solve this. I am coding a Container Class and run into a...
[6 replies] Last: C++20: #include <concepts> template < typename VTYPE > struct Conta... (by JLBorges)
by ruzip
Convert any value/type to string callable from C
I'm trying to build a C++ function that converts any type to string. ex. int 4 will be "4" floa...
[5 replies] Last: Thanks guys for the added info. Yes the C part requires it to be C99. ... (by ruzip)
Remove unwanted character from String concat macro
Hi I have a macro to do concatenation as below #define dd Cloud #define ff _Storage #define...
[1 reply] : Pre-processor macros are very limited in what they can do. And, gener... (by kigar64551)
by Geckoo
Rosetta Site
Hello. I really like to "rummage" for some interesting codes on the Rosetta site which seems to me r...
[8 replies] Last: I used to work for a US technology chain store company* that had a sto... (by George P)
Class as struct member
Suppose there is a struct with a class as a member of the struct, as in the example below. typede...
[3 replies] Last: If you want to define its members out-of-line (say, in a .cpp file): ... (by JLBorges)
Execute Code on task kill
Hi everyone, i'm currently working on a sockets project, and i want to recognize wheather the clie...
[10 replies] Last: That is good to know, thanks JL. I have never needed to do that, and... (by jonnin)
Further pure virtual calling issues
A debugbrk_ call occurs when I try to call pure virtual function Allocate_Square(). The debug call ...
[11 replies] Last: Use a factory method: (by JLBorges)
error C2041 - C2415 - C2426
I want to make a dell file, but there are some errors my code #include <Windows.h> #include ...
[6 replies] Last: thanks for replay yes i use vs 2010 , I made a lot of dell files wit... (by Hawlong)
why is istream::read cast to char*
1. why do I need to reinterpret_cast the 1st argument of read() function of ifstream into a char* wh...
[3 replies] Last: Unlike other languages (Java, C#, etc.), there is no explicit "byte"... (by kigar64551)
template metaprogrammingNewTupleType_ not compiling
I have errors in the following: template<typename TVal, size_t N, size_t M, typename TProces...
[2 replies] Last: Looks like the usage of NewTupleType on line 42 can be replaced entire... (by mbozzi)
Error when filling a matrix using Eigen
I have the MATLAB code: Nx = 10; Ny = 10; %X,Y defined u = (Y-0.5).^2 .* sin( (2*pi / Lx) * X); ...
[5 replies] Last: I did find the issue and to fix it I used seq() instead of seqN... (by JamieAl)
Tag2ID is giving me trouble
Hi, I am trying to create a metafunction that returns the index of a type in a list of types (Tag...
[5 replies] Last: You're right, thank you. (by mbozzi)
by frek
The type of sting literals (1,2)
What is the type of string literals, say, "Hello", in C++, please? Is it a const char* as Stroustr...
[22 replies] Last: and also: auto str {"hello"sv}; where str becomes a std::string_... (by seeplus)
by zsess
How do I get this to only output the userinput that it finds.
#include <iostream> #include <string> // Note: This library is needed to use the string type using...
[4 replies] Last: Using arrays, then possibly something like this - where it is easier t... (by seeplus)
by ruzip
Looking for a LoadLibrary C example that works with GCC
So far I found this: Removed stdafx.h Added ...
[3 replies] Last: LoadLibraryA means you're compiling as ASCII and not unicode. Hence st... (by seeplus)
Pages: 12345
  Archived months: [jun2022]

Cannot post in this page. To post a new message, go to the first page.