Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


WinXP C++ Problem

This topic is 5284 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to write my programs as I am learning C++, for example the Hello.h program that we all write on day one, accourding to my book. After it is compiled and what not I run the hello.exe a dos window comes up for a second and goes back down. If i bring up the cmd console and goto the folder in dos and type hello it works, but not from windows. Is this an XP setting/thing? Is it fixable? or do I just have to run dos every time to do this? Or is it my version of dos with xp? Also while I'm posting. What is a good "free" compiler for learning C++. And I'm only on day three it hasn't really discussed programs, I don't have the disk that is supposed to come with the disk. Are compilers, linkers and such all in one program or do I need seperate ones for each? [edited by - wolfspirng on May 31, 2004 10:49:56 AM]

Share this post

Link to post
Share on other sites
Either put system("PAUSE") at the end of your program, or run it from the command prompt.

Now, with regards to compilers:

The best free compiler out for windows is the one that comes with VC++.Net 2003. You can download it from Microsoft.com. It''s the exact same compiler as the one that ships with the professional edition, and a debugger and *most* of the libraries (except MFC and other MS-specific stuff) are free downloads as well. http://msdn.microsoft.com

A linker is a seperate program, technically, but it''s almost always used in conjunction with a compiler to create programs.

The above mentioned download includes the linker you need as well.

Share this post

Link to post
Share on other sites
Windows XP don´t run MS-Dos programs properly, so maybe that''s why you can´t see your program on a console window, also, if you are only displaying a message in your hello program, try catching a key before closing the app. in this way you can see the results before closing the window.

#include <stdio.h>
#include <conio.h> // Only borland compilers,
// use ''getc(stdin)'' otherwise

void main()
printf("\nHello World!");

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!