0

I wrote "Hello World " code in code blocks... then I press F9. Then It shows error massage...

Error indicator (a red box ) indicate first line #include <iostream> why???

4th Aug 2016, 3:13 PM
Md. Mahmudur Rahman
Md. Mahmudur Rahman - avatar
9 odpowiedzi
+ 2
write ur program once here
4th Aug 2016, 4:31 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
did u include namespace std; ?
4th Aug 2016, 3:49 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
yes... using namespace std;
4th Aug 2016, 4:15 PM
Md. Mahmudur Rahman
Md. Mahmudur Rahman - avatar
+ 1
if code blocks gave an error at the writing namespace std is irrelevant. what did the debug window say your error was
4th Aug 2016, 4:47 PM
destro
+ 1
ur code is good with no errors try compiling by removing return 0;
4th Aug 2016, 5:06 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
main() should have no spaces.
6th Aug 2016, 2:16 PM
Samuel Neo
Samuel Neo - avatar
0
#include <iostream> using namespace std; int main () { cout << "Hello world"; return 0; }
4th Aug 2016, 4:58 PM
Md. Mahmudur Rahman
Md. Mahmudur Rahman - avatar
0
what was the error that code blocks gave you
4th Aug 2016, 5:02 PM
destro
0
#include <iostream> void main() { cout<"Hi to the world"; return 0; getch(); }
7th Aug 2016, 3:48 AM
Zahid Khan
Zahid Khan - avatar