add class to a project
-
I have download a demo console applic. from this site,but I want to add it to my project(console applic.) as a class
Ok, so what do you need help with?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
Ok, so what do you need help with?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
There is no one-to-one correlation between a file/app and class. A class should be thought of as an autonomous object. You will need to go through the application, probably several times, and figure out what parts can be put into their own class. You may end up with one large class (hopefully this won't be the case as large classes are unproductive), or you may end up with dozens of smaller classes. As a very primitive example, how would you turn the following application into one or more classes:
#include <stdio.h>
void main( void )
{
printf("Hello World\n");
}
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
david told the most, but you could do this. is the source is well written, it is probable that its author put his class declaration into a whole header file (h, hpp, hxx, hh), and the implementation into a module file (cpp, cc, cxx). if so, just import those 2 files into your workspace (VC++6) or project (VC++7 and later) if he didn't, extract the classe by yourself and paste it into a new file of your own in your solution (but i doubt you'll have to do that).
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
david told the most, but you could do this. is the source is well written, it is probable that its author put his class declaration into a whole header file (h, hpp, hxx, hh), and the implementation into a module file (cpp, cc, cxx). if so, just import those 2 files into your workspace (VC++6) or project (VC++7 and later) if he didn't, extract the classe by yourself and paste it into a new file of your own in your solution (but i doubt you'll have to do that).
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
there are 3 header files and 2 module files(.cpp) how can I import these files to my workspace(I'm using VC++ 6)
you copy the files into the directory your source files are created (into windows explorer). then, you go into your workspace (workspace tab), and right click the project item -> add existing files to project... and choose the files you've just copied... the header will appear in the header folder, and the c files in the source folder...
TOXCCT >>> GEII power
[toxcct][VisualCalc]