Hey,
I have two files. One is a class file that I created and the other file implements the class. I have a couple of questions concerning this.
First off, in my class file, do I need to include the class declaration and all the methods of the class? Right now my class file just looks like this:
The methods setStackSize, pop, and push are all written inside of my driver program.Code:class myStack { public: string (*aa); int stackSize; int cc; void setStackSize(int); void pop(int); void push(int); int displayStackSize(); };
Second, to include my class from my driver program, is the correct code:
or does it need a .c or a .h at the end? .h is only for header files, what is a .c? Does that just mean that it is written in C?Code:#include "myStack"
Thanks!



LinkBack URL
About LinkBacks




