+ 2
I don't really understand the c++ could someone please help me? Not the c++, when you put two (++) in front a value.E ample. 2++
4 Réponses
+ 5
it is incrementing a value
there are two ways
post and pre
example
x++ and ++x
both increments the value by one but when you use pre incrementing it increases the value by 1 before evaluating and in post case it increments after evaluating
eg.
x = 2;
cout<<x++; // = 2;
cout<<x; // = 3
as you can see x is incremented after evaluation
y = 3;
cout<<++y; // = 4
cout<<y; // = 4
in case of pre incrementing y is incremented by 1 before evaluation.
hope this will help if you have any further questions let me know.
+ 2
@Netkos 😂😂
+ 1
Im guessing you mean the C++ tutorials? Can you post a code snippet and explain which part you are having trouble with, then we could give you some help.
0
If you've read through it over and over for a year and still don't understand it, let me know and I'll help you. If you read it once and expected to be a master programmer, I can't help you.
Do you have a specific question/problem? I may be able to help with that. Or if you have $50/hr, I'll personally teach you the language.