// my first program in C++
#include <iostream>
usingnamespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
I keep getting this error -
1 2 3 4 5 6 7
mingw32-gcc.exe -c C:\Users\DuckkTV\Desktop\HelloWorld\HelloWorld.c -o C:\Users\DuckkTV\Desktop\HelloWorld\HelloWorld.o
C:\Users\DuckkTV\Desktop\HelloWorld\HelloWorld.c:2:20: iostream: No such file or directory
C:\Users\DuckkTV\Desktop\HelloWorld\HelloWorld.c: In function `main':
C:\Users\DuckkTV\Desktop\HelloWorld\HelloWorld.c:4: error: syntax error before ':' token
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings (0 minutes, 0 seconds)
If #include <iostream.h> works you should think about updating your compiler.
@powerbg We weren't talking about he cannot see the results. He cannot compile it. Also use Code tags.
The stdafx thingy shouldn't be your case, as your project is on your desktop, and stdafx is a VS's thing who by default puts your projects in the Documents folder.
Still no luck :( What do you use to code/ writing program? I am currently using codeblocks. But I don"t know all my ways around it. Right now what i do is