/*************************************** 4a_main_2.cpp Example source file for section 4a of the LoomSoft article: Organizing your Project Web: http://loomsoft.net Email: jay@loomsoft.net ***************************************/ #include //Required header file for i/o streams extern void ask_question(void); // Here is the use of extern. The extern keyword simply tells the program that the actual // declaration of the function ask_question is located somewhere else, and to use that declaration when // the function ask_question is called from anywhere in this file. However, extern also has scope, just like // any other declaration in C++. If you were to move this line to after the { in the function // main, the program would only be able to call ask_question from inside the main function. int main() // The main function. This is where the program starts { cout << "Hello world!" << endl; // Output a hello statement ask_question(); // Call the function called ask_question. return(0); }