Tôi có thể đặt một lớp bên trong một DLL không? Lớp tôi đã viết là:Làm thế nào để sử dụng một lớp trong DLL?
class SDLConsole
{
public:
SDLConsole();
~SDLConsole(){};
void getInfo(int,int);
void initConsole(char*, char*, SDL_Surface*, int, int, int);
void sendMsg(char*,int, SDL_Surface*);
void cls(SDL_Surface*);
private:
TTF_Font *font;
SDL_Surface *consoleImg;
int width, pos, height, line, size, ctLine;
SDL_Surface* render(char*,int);
};
tôi biết làm thế nào để tải một DLL và sử dụng các chức năng bên trong một DLL, nhưng làm thế nào tôi có thể đặt một lớp bên trong một DLL? Cảm ơn nhiều.
Tôi tin rằng mọi thứ bạn cần là [ở đây] (http://msdn.microsoft.com/en-us/library/a90k134d.aspx) – icecrime
Bạn đã thử chưa? – BlackBear