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: \" < inco
It does compile with g++ 4.4.3
#include
int main (void)
{
int const income = 0;
std::cout << "I'm sorry, your income is: " < income;
}
However, when running it with -Wall (good practice!), I got a funny message:
:~/stack$ g++ test.cpp -o temp
:~/stack$ g++ -Wall test.cpp -o temp
test.cpp: In function 'int main()':
test.cpp:5: warning: right-hand operand of comma has no effect
No clue what it actually does (or tries to do)...