Thread: brand new to c++ and having a problem wit some experimental coding

  1. #16
    Madly in anger with you
    Join Date
    Nov 2005
    Posts
    211
    a++ is just like doing:

    a=a+1;

    ++a is just like doing:

    a+1=a;

    decrement is no different, I am sure you get the picture.

  2. #17
    Registered User
    Join Date
    Jan 2005
    Posts
    7,363
    That is not correct. Both a++ and ++a are the same as a = a + 1. The difference is in the value they return: a++ returns a before the increment, ++a returns a after the increment.

Popular pages Recent additions subscribe to a feed
Website Security Test