We would need more info to help you with the specific commands. but the general idea is:
1. right your main function preferably in a main.cpp file. if this is a simple program this might be all you need.
2. write your class implementations in separate cpp files e.g. ClassName.cpp.
3. make header files that declare your classes: ClassName.h.
4. #include your header files where ever they are needed.
5. if you are using an IDE, xCode or Visual studio are recommended, when you press compile or run it will take care of all of the compiling and linking for you. if yo are using a CL compiler, you will need to compile and link things yourself.
if you just have a main.cpp and no errors
g++ main.cpp
should give you a working program in a terminal.
note: the compiled program is probably called a.out, you can also provide more args to g++ and specify a name if you wish.
I don’t believe in fighting unnecessarily. But if something is worth fighting for, then its always a fight worth winning.
check me out on
Twitter and on
GitHub