/****************************************************************/ /* Purpose: Trivial example illustrating separate */ /* compliation */ /* Name: M. Overstreet */ /* Date: 27 Jan. 2006 */ /* Description: Driver routine which calls 3 functions which */ /* have been separately compiled. */ /****************************************************************/ /****************************************************************/ /* Listing Contents: */ /* Use instructions */ /* Reuse instructions */ /* Compilation instructions */ /* Source code */ /****************************************************************/ /****************************************************************/ /* Use Instructions */ /* Assumptions */ /* Program is compiled as described below */ /* Current directory is in user's path */ /* The program to be executed is in user's path and is */ /* "RunMe" */ /****************************************************************/ /****************************************************************/ /* Reuse Instructions */ /* Program is so short, reuse opportunities are limited -- */ /****************************************************************/ /****************************************************************/ /* Compilation Instructions */ /* Compiled under Solaris with provided makefile */ /****************************************************************/ #include using namespace std; extern void ModuleA( int x ); extern void ModuleB( int y ); extern void ModuleC( int x ); int main( ) { int a, b, c; cout << "Main running" << endl; // Get inputs cin >> a >> b >> c; // Call modules ModuleA( a ); ModuleB( b ); ModuleC( c ); // Report completion cout << "Main done." << endl; return 0; }