The cpp file used to define the methods in the h file shouldn't have main() in it. The driver program, which is also a cpp file, will have main in it. It would have been nice if the driver files were given a different extension than the files used to define class methods but they are what they are. Don't give the driver program and the header file the same name.
a.h
a.cpp //where methods in a.h are defined. May be blank if all methods inlined.
b.cpp //driver program where a.h is included and a.cpp linked by association with a.h
Last edited by Lerner; Mar 2nd, 2007 at 4:09 pm.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Offline 2,253 posts
since Jul 2005