Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Simple help with classes
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
"A. J." <A._member pathlink.com> wrote in message news:cq4dih$14md$1 digitaldaemon.com...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 Dec 19 2004
|