Wednesday, October 5, 2011

How C++, can be funny :)

Check this 
int i = 10;
int j = i++ + ++i;
What will be equel j? ))

How about this?
int main(){
int x[x];
j::i;
i::j;
}
This code will work if define namespace like this
namespace j{
const int x =1;
struct i{
static int j;
}
}

No comments:

Post a Comment