Is this too old

Posts 1–7 of 7 · Page 1 of 1
Is this too old
It my tutorial too old? I noticed none IDE wanted to compile my code...


#include <iostream> //Even iostream.h doesnt work

using namespace std; //Doesn't recognize std

main()
{
cout << "My text" << endl;
return 0;
}
Nope, not too old. But, you made one mistake, every function needs a type when declared.

[php]
int main()
{
//code
}
[/php]
Ya i put int main

i did it fast i did not copy and paste so that why i forgot to add it. Now I checked another tutorial and i need to add stdafx.h... In the other tutorial i didnt had too, but it didnt worked too.
If you're using Visual Studio, create empty projects, it makes like simpler..
Quote Originally Posted by Void View Post
If you're using Visual Studio, create empty projects, it makes like simpler..
I tried to use:

codeblock: error
Dev c++: error
vs++: error
eclipse: error
ibean: error

But it is fine I now use vs++ but include the stdafx.h.
Post your errors please.
Quote Originally Posted by naghal707 View Post
But it is fine I now use vs++ but include the stdafx.h.
Quote Originally Posted by Void View Post
Post your errors please.
I think it's fine now. But for next time, yeah post what the error says and your code.
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us