I have made a class....I want to put it in another cpp file to make the main CPP easier to handle. I get errors about my window handles from my main cpp file
Printable View
I have made a class....I want to put it in another cpp file to make the main CPP easier to handle. I get errors about my window handles from my main cpp file
Hmm, what sort of error is it and on which line of code? When you put your class in a header file, you just have to define and then you can put all the code in your cpp file.
PHP Code://Header File
class myclass
{
public:
void function1();
void function2();
private:
int myvar;
//.......
};
PHP Code://Class source file
#include "myheader.h"
void myclass::function1()
{
}
void myclass::function2()
{
}
//......