Beginners

by admin
Welcome -- read before posting!
 
Welcome to the beginner's forum in C++.com! In this forum, users can to talk about any topic relate...
[2 replies] Last: How To Answer Questions in a Helpful Way Be gentle. Problem-relat... (by admin)
Console Closing Down (1,2,3,4,5,6,7)
 
Hi, i am new to C++ and have just written my "Hello World" program. It worked all right but the cons...
[120 replies] Last: It displayed "Hello world" after you pressed Enter. int c is a ... (by Duthomhas)
C++ Questions
 
1) Why does "&myChar " act differently in 2 different contexts? char* pointer = &myChar ; //A...
[5 replies] Last: 1A) "myChar" is really a pointer to the 1st element(char*), so cout p... (by Peter87)
Container questions (1,2,3)
 
Just read and practiced my vector/deque/list/forward_list/set/multiset containers and I wondered abo...
[51 replies] Last: A compile time check would be one of the NP complete problems I believ... (by jonnin)
Shared variable between thread(ISR) and main()
 
Hello folks, I want to create a variable that will be shared between a thread (ISR) and main() I...
[8 replies] Last: Second, I learned about circular buffer. I wonder if it is suitable ... (by kigar64551)
by Ch1156
Collision detection using bit manipulation
 
So while working on a small game I discovered that the usual if statements for collision detection w...
[12 replies] Last: Using bool and simplified, consider: #include <iostream> #include <... (by seeplus)
Confused about dangling pointers on a parent-child class
 
I am trying to understand dangling pointers using a Base Class and a Derived Class. #include <...
[15 replies] Last: A reference can also dangle for the same reason, the object referred t... (by George P)
sizeof(integers)/sizeof(integers[0]) on vector<int> (x64) (1,2)
 
sizeof(integers)/sizeof(integers ) On x86 this works just fine, but on x64 the vector seems to r...
[22 replies] Last: IMO using != no matter what the layout of the container might be mak... (by SubZeroWins)
Operator overloading (1,2,3)
 
I am trying to understand operating overloading a bit better and I have 2 questions. 1)Why do we ...
[42 replies] Last: Oh, I thought they were the same thing. A null terminated character = ... (by SubZeroWins)
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 ...
[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...
[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 l...
[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 purchase...
[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 com...
[3 replies] Last: i wand to get char from the terminal window Note that whilst getcha... (by seeplus)
C++ move constructor spot untold error
 
Good day admin Please what could be the error in c++ code below. The c++ syntax below is pouring o...
[11 replies] Last: Personally I'd treat a moved object to be as safe as an empty elevator... (by George P)
by lul
help with reference usage
 
Write your question here. Hi, compiler gave me error about the reference line: vector<int>& c = ...
[7 replies] Last: I want to hold the reference because in the thinking of once i change ... (by lul)
by demhat
how to make ignorance in sequence scanf input
 
hi guys, here in this code, it's working if I execute scanf functions one by one (independently, as...
[5 replies] Last: What if user enters suzyismybestfriendandiwillalwaysloveher ? ... (by Duthomhas)
by Mif
C language. Code working in debug mode and not in release why?
 
Hello.. I'm currently working on a RPG game I use VS 2019 and I use 'C' language. I am a bit confus...
[12 replies] Last: .. Yes, I understand my buggy code logic fully and I found that quite ... (by Mif)
by demhat
what can I do?
 
what does the word 'branch' mean in computer language? I am studying C/C++ from a book and the bo...
[4 replies] Last: thank you guys (by demhat)
projects and files tracker
 
Hi folks, I am trying to find a simple and robust software tool to track my projects and files o...
[7 replies] Last: Markdown editors available for Linux: https://itsfoss.com/best-markdo... (by George P)
  Archived months: [dec2023]