I have three files: class.h with declaration of class; class.cpp with definition of class and main.cpp where I call class. How can I compile it?
I've tried
g++ main.cpp class.h class.cpp
but I have a lot of errors like "not declared in this copy or library doesn't include", but I actually included this libraries in class.h and inclued class.h in main.cpp. I mean when I compile it in Visual Studio all is working, but in Linux it isn't.