How to run a program after writing in c++ please help :)

Jan 4, 2014 at 12:17pm
Salam!
I started to learn C++ (today :D). I downloaded turbo c++ and I have written a program (Hello World) in it. But when i click compile it shows me that it is fine and have 0 errors, but its not showing HELLO WORLD!!.... Or you can say its not showing my program that what will it do... sorry for bad english... please reply soon... thanks in advance...
My program is:

1
2
3
4
5
#include <iostream.h>
void main()
{ 
    cout <<"Hello World:';
} 
Jan 4, 2014 at 12:43pm
I have also tried clicking RUN>>Run but its not working... by the way (programs which are saved as examples) workd fine when click on Run>>Run....
Jan 4, 2014 at 1:08pm
http://en.wikipedia.org/wiki/Turbo_C%2B%2B

Turbo C++ is just old. I suggest you downloading Code::Blocks, it comes with not-this-old MinGW.
You can also download Nightly versions - these are the newest ones. Have some bugs, but also many improvements.
As for latest version of MinGW - you may want to try here:

http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release/

And drop whatever book/tutorial you are reading. If it wants you to use void main(), then it's worthless.
Jan 4, 2014 at 1:35pm
Thanks for the help, please reffer me a good book to read for tutorials...
Jan 4, 2014 at 1:54pm
Jan 5, 2014 at 11:04am
Thanks for helping me :)
Jan 5, 2014 at 12:06pm
Copy and paste this :

1
2
3
4
5
#include <iostream.h>
void main()
{ 
    cout <<"Hello World !";
} 
Jan 5, 2014 at 12:37pm
1
2
3
4
5
6
7
8
#include <iostream.h>
#include <conio.h>

int main()
{ 
    cout <<"Hello World";
    getch();
} 


Forget it, use code::blocks just like what MatthewRock said
Last edited on Jan 5, 2014 at 12:37pm
Jan 5, 2014 at 6:35pm
closed account (iAk3T05o)
Download programming practice and principles using c++, it's by the c++ language creator.
Topic archived. No new replies allowed.