#include // Why does this source code not compile? // // First, examine the code and try to // identify the problem without compiling it. // // If you cannot find the problem, compile // the code and use the compiler's error // message as a hint. // // If you still cannot find the problem, // scroll down. // Function declaration int main(); // Function definition int min() { std::cout << "Hello World!" << std::endl; return 0; } // A C++ program must define a function // called 'main'. This program only // declares 'main': // // int main(); // // The function definition // // int min() { // // defines a different function called // 'min', not 'main'. Consequently, the // linker cannot find the definition of // 'main' needed to create the executable.