Опечатка с «cout

I have this code and I searched for hours why it fails to print my income

int const income = 0;
std::cout << "I'm sorry, your income is: " < income;

Until I found I missed to write << but wrote <. Why doesn't the compiler detect this and error out? I'm not sure why comparing cout makes sense?

25
задан Johannes Schaub - litb 14 April 2011 в 15:00
поделиться