Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#686 Increment operands wrong

open
nobody
None
5
2012-09-26
2007-12-21
Tommy
No

int i=5,j;

j=++i++i++i;
printf("%d\n",i);
printf("%d",j);

output:392 // should be 336

Discussion

  • Logged In: NO

    the hole is in whole c++
    books 'bout c++ advices not to use more than one in/de-cremental operator in expression because c++ standard don't handle it