• 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 bibo
Regex error: Parenthesis is not closed.
 
int main() { string integer = "(\+|-|\0)[0-9]([0-9]{*})"; //string d1 = "("+integer+"...
[3 replies] Last: I get Unexpected character in brace expression. ¿what's your inten... (by ne555)
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)
i need some help
 
During this period of lockdown, many people started to play different games at their homes since th...
[15 replies] Last: Not possible, but you can put the screenshot up on Pinterest or some o... (by againtry)
by Puyol
Black and white kings on the chessboard
 
Inputting the numbers of the white and black king cells on the chessboard in turn, followed by the n...
[2 replies] Last: It’s a trick question because the rules of chess are such that the k... (by againtry)
by bibo
Pass member function as a argument
 
typedef bool compF(int, int); typedef priority_queue<int, vector<int>, function<bool(int,int)>> my...
[2 replies] Last: minimum (but far from best) fix is probably to bind your member compar... (by Cubbi)
by bibo
Need of declaring a data member directly inside constructor
 
typedef priority_queue<int, vector<int>, function<bool(int,int)>> mypq_type; class Node { publ...
[1 reply] : to call the constructor of base class and member variables use the ini... (by ne555)
Deleted constructor acts strangely
 
I have the following class: class Foo { public: int blablabla; Foo() = delete; Foo(int x) : b...
[5 replies] Last: I understood finally. Didn't know I could declare a function inside an... (by PSYCHAMERON)
Passing member function as a parameter...
 
I want to pass(from one class to another) a member function as a parameter and then for that member ...
[2 replies] Last: Thank you very much, was pulling my hair out with this. (by LearnsMore)
Read and write REAL scalars from and to file
 
I need to read and write REAL acalars from and to file. Please advise how to correct the following ...
[3 replies] Last: are you writing them as text? You may want more digits, eg %1.15f as... (by jonnin)
Character placement in a grid
 
Hello, how can I place characters other than the @ in the grid without the grid marking every positi...
[12 replies] Last: Hello the two separate functions work as I want. But I have to be able... (by oneidacharisse)
CppCast: TensorFlow
 
Rob and Jason are joined by Andrew Selle from Google. They first discuss Ranges support being added ...
[1 reply] : Don't bother with this trash. The broadcast sounds like unintelligible... (by againtry)
Problem with AABB Collision Resolution
 
AABB Collision Detection is easy. You simply set up the sides of a square or rectangle, and see i...
[4 replies] Last: Thank you doug4, Ganado, and jonnin for all of that information. doug... (by AspiringProgrammer85)
Pages: 123... 5
  Archived months: [jun2020]