-1

that's my first use to code block but it hasn't gone fine ,, i face a really weird problem i cant even describe it so i will just tell you what's happened. the problem is that the ide dont compile my project even if the code were correct its just open a new tab that called "iostream" and the console window appears but empty why do that happens ?

look to the code which the ide face a problem while compiling it ,, simplest code ever

#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}

and this is the compiling results...

enter image description here

thats all..

will codeblocks stop annoying me ?

  • Did you really write it as `unsingnamespace` or did you post fake code? Also, what is the full caption of that black console window? – AnT stands with Russia Oct 17 '14 at 18:50
  • @Cyber im not new wich c++ dude ,, im just new with code::blocks ,, and i know that it shouled be typed like that `using namespace std;` and thanks for trying to help ,, the problem has been solved – Mohamed El Sayed Oct 22 '14 at 17:32
  • 1
    It is very nice that "the problem has been solved", but this is not a chat room. And "the problem has been solved" is not something of any value here. If you have a solution - you post it. If there was no problem in the first place - you delete it. – AnT stands with Russia Oct 22 '14 at 18:38

1 Answers1

3

This line is not valid syntax

usingnamespace std;

Those are two separate keywords

using namespace std;

And since you are just starting C++, Lesson 1: Don't do that.

Community
  • 1
  • 1
Cory Kramer
  • 114,268
  • 16
  • 167
  • 218