[ create a new paste ] login | about

Link: http://codepad.org/cYXEuRuQ    [ raw code | output | fork ]

C++, pasted on Nov 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<iostream.h>
int main()
{
int a=10;
a=a++;
cout<<a;
cout<<"\n";
a=++a;
cout<<a;
cout<<"\n";
a=(a++);
cout<<a;
cout<<"\n";
}


Output:
1
2
3
4
5
cc1plus: warnings being treated as errors
In function 'int main()':
Line 5: warning: operation on 'a' may be undefined
Line 8: warning: operation on 'a' may be undefined
Line 11: warning: operation on 'a' may be undefined


Create a new paste based on this one


Comments: