c++ - Simple help with classes
- A. J. (20/20) Dec 19 2004 I new to programming and c++ (I started this semester at school). At sc...
I new to programming and c++ (I started this semester at school). At school I learned how to use c++ on unix machines. I want to try writing some code on my windows machine, but I cannot figure something out. The problem is with creating and including classes. I wrote a class "Deck" that has a deck.h and deck.cpp file. I tested the class with a very small driver program written on the cpp file and it worked fine. The problem I have is when I made another file decktest.cpp and I want to include deck.h with it. I remember in unix i would first make my header files into *.o files, then include them as arguments when I compiled my program. The way I am used to doing it is like this: prompt-> g++ -c deck.cpp prompt-> g++ -o decktest decktest.cpp deck.o where decktest is the outputted binary. I am not sure how to make *.o files and am not sure if that is even what Windows needs. And, once I have *.o files (if they are necessary) how do I compile everything into a *.exe? I am using TextPad to write my code and digital mars's newest version of its compiler. Any help would be appreciated. If you would like to look at any of my code to tell me what to add please email me and I will gladly send it. A. J. zyberwoo uga.edu
Dec 19 2004