User forums > Help
Unable to run.
(1/1)
ultrabot90:
I'm new to C::B, hence I dont know too much about this IDE. I created a Hello World program to check out C::B, and compiled it - zero errors...But I when I looked in "Build" menu...I find that all the options are greyed except for "Compile Current File", "Errors" (just "Clear all errors" available), and "Compiler Options"...T_T
Also, it got a warning for using outdated header files (I used <iostream.h> instead of <iostream> etc). And when I removed the ".h" from it, I get a load of errors that I havent declared a cin and cout >.>
Please help.
-regards,
ultrabot90
Biplab:
When you are including <iostream> you've to define the namespace where compiler can find out cin , cout and others. Type in the following code and it should run perfectly.
--- Code: ---#include <iostream> // Basic header for IO
using namespace std; // Tell compiler that we're using std namespace
int main ()
{
cout << "Hello World!" << endl;
return 0;
}
--- End code ---
Regards,
Biplab
ultrabot90:
Thanks for the tip ;)
Any help for the first (and most cruicial problem?) Or is there some detail I've left out? o.0
Biplab:
My guess you didn't create a project. Try creating a Project first (For your case, a Console Project should be created).
ultrabot90:
Hm...that does seem to be the problem...Yeah, thats cracked it! w00t. Thanks a load. I used Borland Turbo C++ 4.5 earlier, and it didnt seem to have this project system. Hence such a n00bzor question. Thanks again. :D
Navigation
[0] Message Index
Go to full version