Rcently,i come across a problem,i wrote a code as following: Code: #include <stdio.h> //#include <stdlib.h> void ex(int &a,int &b) { int t; t = a; a = b; b = t; } int main() { int a,b; a = 1; b = 2; printf("%d%d\n",a,b); ex(a,b); printf("%d%d\n",a,b); //printf("Hello world!\n"); return 0; } but when i copy it into codeblocks and wDEV c++,then i rebuild it ,it could not success,but when i rebuild it in c-free,it works!~~nothing wrong. could someone tell me why? Thank you !
Cross-posted and answered here http://cboard.cprogramming.com/c-programming/130920-about-complier.html