Click to See Complete Forum and Search --> : How can I do a program with three classes


nicoletonyf
October 22nd, 2004, 08:33 PM
Hello there, I have to make a program using three classes. One for the input, a second for the transaction, and a third one for the report. Can I write the three class definition in one header file? Can I write the three classes in one .CPP file?
Can I find an example of a program like this on the Internet?Thanks

Marc G
October 23rd, 2004, 12:58 PM
Yes, you can put them in one .h and one .cpp file, but it's much more nice to put each class in their own .h and .cpp file. It's more clean and beter reusable afterwards.