Hmm well CB should do this kinda stuff for you, but Project->Properties->Build Targets "build target files" box, can you see a list of all the files you need there? And they're checked?
Ok, that worked. But now I am getting a new error. Now it is saying that cout was not declared in this scope in the file hi.cpp. I tried to add #include <iostream> and using namespace std; to it and it worked. Do I have to do this every time i want to create another cpp file, because I was told that I only have to do #include <iostream> and using namespace std; in the cpp file that has main() and also the headers
EDIT: Sorry, the error was because i didn't declare that I was using the standard namespace in the header. Never mind my last question, thanks for the help
Do I have to do this every time i want to create another cpp file
Yes. If you use something from the standard namespace you need to properly scope the standard namespace. Another option is to properly scope the std namespace using the scope resolution operator::
std::cout << "This is an example of scoping the standard namespace" << std::endl;
This will need to be done where ever you use something that is in the standard namespace. And many people, myself included recommend this practice.
Sorry, the error was because i didn't declare that I was using the standard namespace in the header
You should never use a using statement in the global scope in a header file. Doing so is considered a very very bad practice.