A friend of mine told me that this code has some problems:
#include <iostream>
#include <cstdio>
using namespace std;
#define cout printf
int main(){
cout("cout");
}
He didn’t give me the reason and asked me to figure it out which I couldn’t. The code seems to be working fine, what could possibly be wrong with it?
As far as I know the Standard forbids defining names (with #define) declared in any standard library header.
Found this in n3290 ($17.6.4.3.1)