Problem Creating a separate file for a class
I am testing my c++ knowledge in a console application call test, the thing is that when I create a separate class,I use it in main and I run it, the compiler say that there's not such file so I can't use it. I already include the class with #include and I belive that I have the constructor and the destructor functions (the only two that the class have for now) right Here is the message that the compilers sais when I try to run the application "No such file or directory" I know it is the class because before creating it as a separate file the application run fine Here is the code: Main.cpp #include <iostream> #include <string> #include <Class.h> using namespace std; int main() { Class obj; return 0; } Class.h #ifndef CLASS_H #define CLASS_H class Class { public: Class(); ~Class(); protected: private: }; #endif // CLASS_H Class.cpp #include "Class.h" Class::Class() { cout << "Hi" << endl; } Class::~Class() { cout << "Bye" << endl; } I am doing this on my computer with code blocks and the compiler gnu