General C++ Programming - July 2022 (Page 2)

by hbcpp
Smart pointer confusion (std::unique_ptr in function argument) (1,2)
 
this is my first time working smart pointer and I getting confused with this: void test(std::uniqu...
[29 replies] Last: "I saw the light, I saw the light No more darkness, no more night Now ... (by seeplus)
how to get locale based digit groups separator (ansi c)
 
I've tried searching for this information on the web but keep getting directed to either c# or c++ s...
[8 replies] Last: I may have had an ABI issue, I did a rebuild during my attempts to fin... (by awsdert)
dynamic array allocation
 
Hello. Had an assignment using dynamic array allocation. Instructions: Write a program that prompt...
[4 replies] Last: There is also a design decision about how to handle less consistent us... (by keskiverto)
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 deleted account xyzzy)
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: https://en.wikipedia.org/wiki/Factory_method_pat... (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)
July 2022 Pages: 123
  Archived months: [jun2022] [aug2022]

This is an archived page. To post a new message, go to the current page.