how to attach the class to my project

I am ready to send a bunch of assignments to my prof BUT I can not figure out of how to

attach the class to my project, so I can send only one cpp file, and he can run the program from the executable.

I can run the program in my PC:

I do this

To set this from within your project go to Project Properties - Configuration Properties - C/C++ - General and add this directory to Additional Include Directories. Alternatively you could move the include file to the same directory as you *.cpp file.

BUT I know is a way to attach the class to the CPP file.

I will appreciate any help, I am been up all night working in those assignments, I just need to able to send it PLUS my email keep bouncing when I send two file, the cpp and the class separately

Re: how to attach the class to my project

Posted 14 November 2006 - 09:18 AM

NO...
The professor wants the class in a different file. I know there is way to attach the class to the cpp file . I have the class definition in a heaer file, I just nees to attached to the same file,so I can send it to the professor...

The program is working in my pc I have #include "fraction_class.h"

and the fraction_class.h is in a directory....IT JUST to send it to me prof so he can just run the exacutable....
I done it once I just can not do it again...thank you

Amadeus, on 14 Nov, 2006 - 08:57 AM, said:

You can simply put the class code in the same file as your main function, and send that. See the following: