Dev C++ Help

Started by
26 comments, last by owiley 19 years, 5 months ago
Mage that program has errors as well with the openning backets and Kspuared I am using Dev C++ 4.9.9.0 and that code does not even pause it doesn't even appear on my monitor.:(
Computers are worlds of Exploration?
Advertisement
This Program you cant even see??????????????

#include <iostream>
using namespace std;
#include <stdlib.h>

int main()
cout << "HelloWorld!" << endl;

system("pause");

return 0;
}

You will only see hit any key to continue.........gggggggggggrrrrrr
Computers are worlds of Exploration?
#include <iostream>#include <cstdlib>using namespace std;int main(){	int min,max;		cout <<"enter minimum";	cin >>min;	cout <<"\nenter maximum";	cin >>max;	for(int i = min;i <= max; i++)	{		cout <<i;	}	system("pause");return 0;}
it works I tested it.

[Edited by - hothead on November 11, 2004 9:55:40 PM]
-----------------------------------Panic and anxiety Disorder HQ
all right C_Programmer0101, you need to start from scratch because this isn't getting anywhere. Mage's code is correct, the source formatting makes it look like it isn't.
if hothead's code doesn't work, read on. otherwise don't.

open dev c++ 4.9.9.0.
(on the menu)New->Project
click the "Console Application" icon, and name it "test". save it somewhere.

it will open with a project workspace, and an unsaved file. push Ctrl + S (or whatever save method you prefer) and save it as main.cpp (not .c or .h).

the template will have created a basic code framework. push Ctrl + F9 to build and compile your application. push F9 to run it. it should produce the following : "press any key to continue".

now before the "system("PAUSE"); add the following lines :
int a;cout << "Hello World";cin >> a;cout << endl << "You chose " << a << endl;

repeat the build procedure (you have to rebuild after every modification) it should allow you to input a number, and spit it out.
- stormrunner
I used hotheads code and it flickered on the screen and then I followed your steps. The first attempt did exactly what you said and then I input the following:

int a;
cout << "Hello World";
cin >> a;
cout << endl << "Hello World" << a << endl;

I could not see the hello world I only seen press any key to continue
Computers are worlds of Exploration?
I haven't seen anything wrong with any of the code samples provided for you thus far. It seems more like you're having a little difficulty interpreting the results of your code modifications. Perhaps, you could try familiarizing yourself with the IDE/compiler a little bit more and then maybe we can help you out some more. In Dev-C++ just click on "Help" and then "Help on Dev-C++" and it will bring up some useful information, not only about Dev-C++, but also a few tutorials as well (most are in C instead of C++, but the concepts are the same for simple programs). Hopefully that will get you off on the right foot and then, if after reading through that you still have questions, feel free to ask. Good luck!
I have given up on Dev C++ and I turned to Microsoft Visual C++ since the .net version I will be using in Class. It seems to be doing the job thus far. I appreciate your help thanks alot guys. YOU WILL BE GETTING A GREAT RATING FROM ME FOR YOU PATIENCE AND WILLINGNESS TO HELP!!!!!!!!!!!!!!!!
Computers are worlds of Exploration?
hey man you need to go to this website and study hard on the concepts

study makes perfect as long as you study the right information....!!!!!!...1..1..1.1.1.
Bring more Pain

This topic is closed to new replies.

Advertisement