• 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]
by stav
container of container of incomplete type: UB or ok?
so usually you cant instantiate a std::pair with an incomplete type like so: class incomplete; std...
[5 replies] Last: That's what I thought you meant, too, otherwise it wouldn't make sense... (by Ganado)
by dodo99
Refresh "modern c++" programming skill
I had programmed for C++ about 10 years but did not do any C++ programming (maybe once in while) aft...
[3 replies] Last: There is also an online tutorial you might want to take a peek at, Lea... (by Furry Guy)
How to delete (backspace) unsubmitted input from the command line after calling cout?
I’m trying to create a program that waits either until the user inputs a certain keyword or until ...
[6 replies] Last: I did some digging... my best guess is that it’s related to ^R meani... (by spark2212)
struct definition
I am used to defining a struct as follows: struct Point { int x; int y; }; ...
[1 reply] : Where is the data member in 'struct A' ? There is none. Is it impli... (by coder777)
by abuh
Please help me
1) Design and implement a class Person. Each object of the class person contains the FirstName and L...
[8 replies] Last: It's not inappropriate but please realise we may never hear from @abuh... (by againtry)
recursive function and double linked list
Hello guys,I have doubts on how to do the function below can you help me? Consider a doubly linke...
[3 replies] Last: Hello you can find by using google advanced search with the dork as it... (by oneidacharisse)
getline function
So my class is taking a full name but for some reason when I use getline(std::cin,name) my program g...
[2 replies] Last: I'll start by congratulating you on writing your << and >> operato... (by dhayden)
C++ Templated struct definition
I have been researching the details of the following struct definition and I have some questions tha...
[4 replies] Last: where I assumed the 'C' in '<C>' was a placeholder.... I'm not sure ... (by MikeyBoy)
by helios
Don't double post. It wastes people's time. http://www.cplusplus.com/forum/beginner/272258/
[no replies]
changing a classification code
Hello, I found this code on the internet (https://programmersought.com/article/52001300562/). I mana...
[11 replies] Last: Hello, excellent, thank you very much! Honestly, it's great. (by oneidacharisse)
by bibo
Regex error: Parenthesis is not closed.
int main() { string integer = "(\+|-|\0)[0-9]([0-9]{*})"; //string d1 = "("+integer+"...
[5 replies] Last: #include <string> #include <iostream> #include <regex> #include <algo... (by dhayden)
cant get it to read the text files and display the txt help
#include <string> #include <iostream> #include <vector> #include <fstream> using names...
[2 replies] Last: cant get it to read the text files and display the txt help Without... (by dhayden)
race condition
Hi! how do I make the following program print numbers in the correct order like this: 0 1 2 ... 100 ...
[6 replies] Last: #include <iostream> #include <thread> #include <mutex> int x = 0; st... (by dhayden)
by Ganado
Struct pointer conversion, possible undefined behavior?
I found a place where some weird casting was happening, and I wanted to confirm if someone knew it w...
[9 replies] Last: Cubbi: Okay, that's starting to make more sense. I didn't realize the ... (by Ganado)
by plexus
Weighted random distribution
Hi all, I'm trying to generate the numbers 0 .. 9 in a random fashion but with different probabil...
[16 replies] Last: A class based approach to encapsulating <random>/<chrono> is a valid... (by Furry Guy)
Debug C main program
I need assistance in debugging a not-very-large C main program. Reason(s) for the crash are not evid...
[2 replies] Last: if its small, you can get solid free help here. Can't hurt to throw ... (by jonnin)
by stav
vector of incomplete type UB still?
Hi, i read this article https://www.drdobbs.com/the-standard-librarian-containers-of-inc/184403814 t...
[1 reply] : So i think i've found the answer here https://en.cppreference.com/w/cp... (by stav)
by AJS248
Need some help with int/ double input error checkings
I'd like to put a condition for a 'double variable.' For example: cin1: double var1; cin >> va...
[5 replies] Last: #include <iostream> #include <sstream> #include <string> using namesp... (by lastchance)
openssl base64 decode function is not working for specfic string
I have the below openssl code to decode json content, it works fine if the encoded data is "eyJ0ZXN0...
[6 replies] Last: yes i will pad it with "=" before decoding, Thanks a lot for clarifyin... (by Scarletpimp)
Pages: 123... 6
  Archived months: [jun2020]