• Forum
  • General C++ Programming

General C++ Programming

by admin
Welcome to this board!
Welcome to the general programming forum in C++.com! In this forum, users can to talk about any top...
[no replies]
why does a deleted copy constructor for a volatile object also deletes copy constructor for non-volatile argument?
This code: class C { public: template<typename T> C(T const&) { std::cout <<...
[no replies]
by frek
We know that in associative unordered containers in STL, like std::unordered_map , the hash functio...
[11 replies] Last: Ganado has a good point. If the number of buckets change it has to reh... (by Peter87)
by frek
Do we still need class template argument deduction guide in C++20?
Hi, Here the deduction guide is not needed on most compilers: #include <iostream> template<typena...
[9 replies] Last: Yes, thanks. Here's an example that actually compiles: template <ty... (by mbozzi)
by Tima11
When I pass const char* as an argument in class constructor it changes its value.
I made a function which converts int to const char*. It works like this: https://ibb.co/6PxcP94 . Th...
[9 replies] Last: typically char is single quote: '1' I don't recall what happens when ... (by jonnin)
by ruzip
Free up Global Pointers in C
How do I properly free up global pointers, specifically character pointers?
[4 replies] Last: I think there is no such thing as a "global" pointer. If you dynam... (by kigar64551)
How to input a 2d vector into a file
Hi I have this code that has this input and I need to put it in the file and I do not know how, this...
[1 reply] : Here's one way to do it, there are faster ways to write to disk, but t... (by newbieg)
What is the best way to create a 3D matrix using Eigen?
What is the best or most efficient way to create 3D matrices in C++ using Eigen, keeping in mind the...
[no replies]
CreateWindow(TEXT("Edit") get string input
He, folks I have a control object. ( CreateWindow ) but can get the string in the TEXT edit window...
[1 reply] : It is undefined behavior (if it even compiles) to rely on a std::strin... (by Ganado)
My 2d array is not out putting all the words (1,2)
I have this code which ask the user for how many words and makes a 2d array but the words the user i...
[24 replies] Last: I really do suggest dumping the C library random functions and learnin... (by George P)
by ruzip
Macro or #define the 'struct' keyword
I would like to define the struct keyword to something else or perhaps use macro to add another keyw...
[7 replies] Last: Thanks for the info guys. I decided to just go for typedef. (by ruzip)
Error: cannot convert ‘const Scalar*’ {aka ‘const double*’} to ‘const std::complex<double>*’
I am trying to solve for a linear system of equations x = A\b and I am using the following expr...
[3 replies] Last: Thanks for the help. I was wondering what is the difference b/w rei... (by JamieAl)
Hello, Cplusplus. I have a problem when I Append the Menu Item a get an error the argument ...
[4 replies] Last: sold the puzel, void AddMenus(HWND hwnd) { HMENU hMenu = Crea... (by nvthielen)
Write object into file
Hello guys, i am working on a simple password manager and i want to write multiple struct Credentia...
[6 replies] Last: Thanks, thats good to know ive already thought that too. I dont suppos... (by LukeProducts)
by ruzip
Detect Num Lock key press/up and other special keys in GLUT/FREEGLUT
I can't seem to find any documentation on how to detect other special keys like Num Lock, Scroll Loc...
[7 replies] Last: Thanks guys for the additional info. The workaround you mentioned ne... (by ruzip)
Shift words
Hi if I have a 2d array , how can I shift either left or right, for example: xhellofreind xxxhello...
[4 replies] Last: 2d is still a solid block. so its fine. 2d dynamic, need to loop it ... (by jonnin)
Assignment with arrays
Hello, I need help with this assignment and I have zero ideas what to do and how to even start. Coul...
[2 replies] Last: your own programming interface and algorithm Maybe :) : #include... (by seeplus)
How to assign 2D array with random numbers
How do I assign 2D array with random numbers. I need to display this C1 C2 C3 C4 C5 R1...
[2 replies] Last: #include <iostream> #include <random> #include <utility> #include <a... (by seeplus)
Overflow while converting domain name to ip address
Hello all, ive just written a function to tell the ipv4 of any domain like f.ex "google.com", and f...
[3 replies] Last: As this topic is marked with a green tick, it looks like the OP has so... (by seeplus)
some function call does not require parentheses?
//Fig. 13.9: Fig13_09.cpp //Creating and testing user-defined, nonparameterized //stream manipulat...
[6 replies] Last: if you want to circle back to the big question, there are several othe... (by jonnin)
Pages: 123... 5
  Archived months: [jun2022]