+ 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++

12th Jul 2017, 5:49 PM
Michael Daniel Bacchus
Michael Daniel Bacchus - avatar
4 ответов
+ 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.
12th Jul 2017, 7:00 PM
Ermyas
Ermyas - avatar
+ 2
@Netkos 😂😂
12th Jul 2017, 6:22 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 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.
12th Jul 2017, 6:09 PM
S C
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.
12th Jul 2017, 5:53 PM
AgentSmith