PDA

View Full Version : ++



Joe123
10-17-2007, 06:00 PM
I've been using this command, but I'm not exactly sure what it does.
What I assumed it to be is, say:

x = x+1;
where x is an integer. Is this correct?

Russ
10-17-2007, 06:37 PM
Yes. ++ means add one. That is where C++ got its name. The maker of it thought he just added one thing to C, so he called it C++. You can also use -- to subtract one (I think).

Joe123
10-18-2007, 03:59 AM
Ah thanks. And yes, you can use -- for subtract one.