You can't run a source file. You will have to first compile the two source files (Rectangle.cpp and RectangleApp.cpp) and link them into an executable file that you can run. If you have added these files to the same project all you probably have to do is to press Build and then run (Not sure about the details because I don't use Code::Blocks).