/******************************************************************************/ /* */ /* FILE: OCTOBER.CPP */ /* I am still discovering strange facts about C++ ... */ /* ================================================== */ /* */ /* Compiled and tested with Visual C++ V6.0 */ /* */ /* V1.10 29-OCT-2000 P. Tellenbach http://www.heimetli.ch/ */ /* */ /******************************************************************************/ #include <iostream> int main() { // While writing this program, I found that // cout << "Hello World !" ; // is *NOT* equivalent to // cout.operator<<( "Hello World" ) ; return std:: operator<<( std::cout,( "One", "more", "way", "to", "print", "Hello World !" )) .operator<<(std::endl) .good() ; }
Update 19. October 2020
The compiler prints warnings, noting "right operand of comma operator has no effect", but the program still runs.