Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Feb 16 2008, 01:43 AM
Post
#1
|
|
![]() Member ![]() ![]() Group: Members Posts: 68 Joined: 10-January 07 Member No.: 105,480 |
The converter didn't work because of some errors, I'm not sure where, i copied it straight off the book i bought. The hello world didn't work because the program won't run. I compiled it and found the .exe and double clicked it but all that pops up is a command prompt for a second and then it disappears with ntohing else. I am using Dev-C++ Does anyone know what's wrong? -------------------- ![]() |
|
|
|
Feb 16 2008, 07:27 AM
Post
#2
|
|
![]() Forum Regular ![]() ![]() ![]() Group: Members Posts: 233 Joined: 11-June 07 From: Cymru/Wales Member No.: 136,036 |
The hellow world one sounds like it's worked.
Try opening a command prompt, then running the hello world program from there. C++ examples can often (even though they shouldn't) be compiler specific. Try searching the net for Dev-C++ Tutorials\examples. From another C++ learner, I hope that helps, -------------------- Tom
Tswsl1989 Duct tape is like the force. It has a light side, a dark side, and it holds the universe together |
|
|
|
Feb 16 2008, 08:33 AM
Post
#3
|
|
![]() Hail Groovicus! ![]() ![]() ![]() ![]() ![]() ![]() Group: Site Admin Posts: 5,985 Joined: 5-June 04 From: Vermillion, SD Member No.: 689 |
C++ is not compiler specific.
However, tswsl1989 is correct that the program probably ran fine. If the command window opened and closed, then it worked. It only takes about a tenth of a second to run a "hello world" program. As was stated, drop to a command line prompt, and execute your code from there. -------------------- |
|
|
|
Feb 16 2008, 12:54 PM
Post
#4
|
|
![]() Member ![]() ![]() Group: Members Posts: 68 Joined: 10-January 07 Member No.: 105,480 |
Ok thank you for your replies, and I have found my problem after digging through various codes from tutorials. Thank you once again
-------------------- ![]() |
|
|
|
Feb 22 2008, 08:53 AM
Post
#5
|
|
|
Member ![]() ![]() Group: Members Posts: 84 Joined: 5-March 07 From: Brighton, UK Member No.: 115,537 |
Also, when learning I realised (I'm english.. I'm not spelling wrong
Dan |
|
|
|
Mar 23 2008, 05:38 AM
Post
#6
|
|
|
New Member ![]() Group: Members Posts: 12 Joined: 23-March 08 From: 76704 Member No.: 198,167 |
If it's not too late I would like to add that entering:
char response; std::cin >> response; before return 0; would let you see the results of your program by closing the program only when a random character is pressed followed by the enter key upon completion of said program. This post has been edited by Deemo Diablo: Mar 23 2008, 05:41 AM |
|
|
|
Mar 26 2008, 09:08 PM
Post
#7
|
|
|
Multi Megaton Malware Munition ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Team Posts: 3,838 Joined: 17-January 08 From: Northfield, Ohio Member No.: 184,215 |
If it's not too late I would like to add that entering: char response; std::cin >> response; before return 0; would let you see the results of your program by closing the program only when a random character is pressed followed by the enter key upon completion of said program. Careful! Dont want buffer overruns, now do we? Billy3 -------------------- The forum is always a busy place. In the event I fail to reply within twenty-four hours, feel free to send me a PM.
Have I helped you? If so, please say so in My Guestbook. ![]() |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 7th October 2008 - 11:35 PM |