Hi. I have never programmed in C++ and am trying to use "SAMS Teach Yourself C++" book to get a general idea of how to use it. I have programmed using Java, but it been about 5yrs since I've used it.
Anyway, I'm on the 8th lesson, which is about modules and I have copied the PromptModule.h and .cpp, ErrorHandlingModule.h and .cpp, and the main.cpp from the book. I am now trying to compile it in the terminal, but I keep getting errors. I've used g++ to compile when I just have one .cpp file, but can I use this for the implementation files, or is there a different command? Do I need to compile the header files? Is there a certain order in which the files need to be compiled?
I would really appreciate any help you could give me. The book does not give any information on how to compile or what commands to use. Here's the link to the book site on google books if it helps http://books.google.com/books?id=4cNyHipV5G4C&pg=PA49&dq=0672324253#PPA51,M1
Anyway, I'm on the 8th lesson, which is about modules and I have copied the PromptModule.h and .cpp, ErrorHandlingModule.h and .cpp, and the main.cpp from the book. I am now trying to compile it in the terminal, but I keep getting errors. I've used g++ to compile when I just have one .cpp file, but can I use this for the implementation files, or is there a different command? Do I need to compile the header files? Is there a certain order in which the files need to be compiled?
I would really appreciate any help you could give me. The book does not give any information on how to compile or what commands to use. Here's the link to the book site on google books if it helps http://books.google.com/books?id=4cNyHipV5G4C&pg=PA49&dq=0672324253#PPA51,M1