Greetings forum members!
My name is Steven. But I'm known as Tech2011 around various sites.
I am new to this forum. Anyways, I have a quick question about C++ arrays.
So I was hoping to design an array with each array value would increment to the next value.
My code is displayed below. I will then explain my problem.
cout << "Please enter an integer." << "\n" ;
cin >> userint;
cout << arraybuildup;
I can't explain why, but for some reason, when a value is given for "userint", it outputs the same value on the screen, instead of the incremental value. This is not what I intended.
If anyone has an idea or solution, your thoughts would be most certainly appreciated!
Thanks for your support!
P.S Follow me on Google Plus. I'm Steven Styffe.
gets evaluated after the expression does.
If only those Postfix increment operators had a meaningful name.....
Yeah you probably want the prefix version, not the postfix one. (Put the ++ in front of the variable)