Beginners - January 2024

Vector of struct vs. two 1D vectors (1,2,3)
 
Greetings, I received the prototype of a simulation code from a colleague for a bunch of particles in two dimensions (x and y coordinates), and I went and impr...
[44 replies] Last: Thanks mbozzi for the interesting reference and your prototyped implem... (by PhysicsIsFun)
OpenMP to compute PI
 
Greetings, I am working my way into OpenMP. The following code is supposed to compute pi. It works fine for one thread, but in case of multiple threads the re...
[9 replies] Last: Thanks mbozzi, I understand! (by PhysicsIsFun)
by jNc
improve logger function
 
void writeToLog(){ string fileName = "/home/j/s/textFiles/logMPU.txt"; string line = ""; int lines = 0; ifstream file(fileName.c_str()); string d_txtFil...
[7 replies] Last: Much depends, of course, on the usage of the logger and it's required ... (by seeplus)
Cstring program not executing
 
Hello, Can anyone please guide what is wrong with my program. copied from a book I recently purchased and tried in code blocks. The terminal opens and I tyoe bu...
[10 replies] Last: I know more than a few GeeksForGeeks C++ code examples are big steamin... (by George P)
getchar and print c
 
hallo, a starters qwestion i wand to get char from the terminal window, but get a gcc error compiling it. ......................................... test...
[3 replies] Last: i wand to get char from the terminal window Note that whilst getcha... (by seeplus)
  Archived months: [dec2023] [feb2024]

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