Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 25th, 2008, 10:08 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default help in compiling with dev c++ 4.9.9.2

hi guys
I'm a real beginner at programing and just programmed "Hello world" with dev c++. I had to switch to Dev as Borland wasn't working for me.
now I cont get the hello world program to open!It compiled OK with 0 errors but it just dosen't open when I double click the .exe file.(opens fine then I cal it with command prompt.)

what should I do to get the exe file to open with out calling it with command prompt?

I really need to get started with programming.
so some one please please help me!!!!!
thanks!

Reply With Quote
  #2 (permalink)  
Old April 20th, 2008, 05:19 PM
Registered User
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

From what i gather you made a program like this one:

// Hello World
#include <iostream>
using namespace std;
int main()
{
  cout<< "Hello World";
      << endl;
  return 0;
}


you need to replace the:
return 0;
with something like:
system("PAUSE");
return EXIT_SUCCESS;


I am also new at C++.. i have been going threw Ivor Horton's Beginning C++ book.. its not mentioned in there at the beginning when you make simple programs like this... i got it from when you make a new project in Dev-C++ 4.9.9.2 it automatically adds some lines of code that you would normally delete and start from the blank slate..

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Dev TEam looking for Help(Need c# programmer) extreme-ca C# 2005 2 August 5th, 2008 02:27 PM
Controls Work In Dev but not Production qdd ASP.NET 2.0 Basics 1 September 6th, 2007 12:45 PM
Open("/dev/lp0", O_RDWR); rinoan Linux 1 December 21st, 2006 07:04 AM
Need help with Prof Portal Dev book rahman All Other Wrox Books 0 March 4th, 2004 04:20 PM
Applications Infrastructure and Dev. Strategy. azharmateen PHP How-To 2 August 20th, 2003 11:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.