Image

Imagelavandergirl wrote in Imagecpp

Whats wrong with my class?

im doing some basic stuff with the FLTK tookit and everything was going fine until i tried to split my code into files so i can get going on my bigger program, but it wont compile, becouse of "Multiple defenition of Windows::Windows(int, int, char const*)" and the same for Window::~Window, whats wrong? im using the Dev-C++ IDE and MinGW, both are up to date:
//main.cpp
#include <FL/Fl.H>
#include "window.cpp"

int main (int argc, char *argv[])


{
Window main(100, 100, "test");
main.show();
return Fl::run();
}

//window.cpp
#include <FL/Fl.H>
#include <FL/Fl_Window.H>

class Window:public Fl_Window
{
public:
Window(int w, int h, const char* title);
~Window();
//put widget pointers here
private:
//callback functions
};
Window::Window(int w, int h, const char* title):Fl_Window(w, h, title)
{
//do nothing constructor
}
Window::~Window()
{
//do nothing deconstructor
}

Thanks for anything else, its probably something silly I have missed :S