-
newbie frustration
:confused: I have just installed dev-c++ and wanted to start learning so of course i came here to use the tutorials and i used the first example on dev-c++ and for some reason it was not working at all. I checked over again and again to see if i missed typed anything and I did not. I really do not know wah i did wrong, or if i did anything wrong at all. Can anyone helped the frutrated newbie, cause I have been wanted to learn C++ so badly and i really need some help to get over this hurdle. thanks
-
Be more specific than "it doesn't work". We can guess that much by the very existence of your post.
Which version of dev-c++ did you download?
Which example (paste it or use a link)
What error message(s) did you get?
Which OS are you using
-
another helpfull thing to post would be the steps you took.
-
they use an antiquted (sp?) header...
Code:
#include <iostream.h>
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}
should be
Code:
#include <iostream> //note the absence of '.h'
using namespace std;
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}
it should give you some warning or something...
-
my guess would be the consule window dissapears before you can see the output. if thats the case there are numerous things you can do. i use dev-cpp and i prefer
Code:
#include <string>
...
...
system("Pause");
return 0;
}
some ppl dont like that because you have to include another header, just search the board and you will find plenty of alternatives.
-
isn't system() in the <cstdlib> header?
-
<iostream.h>
why is that antiquated.
I thought the old way was
Code:
#include<iostream>
using namespace std;
-
Re: <iostream.h>
Quote:
Originally posted by xviddivxoggmp3
why is that antiquated.
I thought the old way was
Code:
#include<iostream>
using namespace std;
:p Nup that's the right way to do it. <iostream.h> is the outdated one.