/* What follows are three files for a very simple * project that uses separate compilation. * (Developed in VC++ under Virtual PC running on a Macintosh G4) */ // multi.h interface file for tiny class-based project // by RP Futrelle for COM1101 W2001 1/29/01 using namespace std; class Car { public: void go(int n); }; *************************************************** // multi.cpp implementation file for tiny class-based project // by RP Futrelle for COM1101 W2001 1/29/01 #include #include "multi.h" using namespace std; void Car::go(int n) { cout << "I'm going another " << n << " meters\n"; } *************************************************** // main.cpp application file for tiny class-based project // by RP Futrelle for COM1101 W2001 1/29/01 #include #include "multi.h" using namespace std; void main() { Car mycar; mycar.go(10); mycar.go(25); } /* Output is: I'm going another 10 meters I'm going another 25 meters */