C++ issue

Closed
Steven75 Posts 3 Registration date Tuesday January 8, 2008 Status Member Last seen February 21, 2008 - Feb 21, 2008 at 08:41 AM
shariqDON Posts 10 Registration date Friday January 30, 2009 Status Member Last seen March 1, 2009 - Feb 1, 2009 at 06:18 AM
Hi!

I'm trying to learn C++ by myself and I decided to work on some very simple/well-known programs.

After doing a "Hello World" Basic run-through (and an attempt at a Fahrenheit to Celsius converter) I have failed miserably... and I'm feeling really frustrated.

The converter didn't work because of some errors, I'm not sure where. I copied it straight off the book I got.

The "Hello World" didn't work because the program didn't run properly. I compiled it and found the .exe and double clicked on it, but all that pops up is a command prompt for a second and then it disappears with nothing else.

Does anyone know what's wrong?

Note: I'm using Dev-C++

I'm also interested in any C++ tutorials - for beginners.

Thanks a lot.

2 responses

nerds Posts 4 Registration date Tuesday January 8, 2008 Status Contributor Last seen February 27, 2008
Feb 21, 2008 at 11:55 AM
Hi!

The "Hello World" program sounds like it actually worked.

Try opening a command prompt, then running your "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.

I hope that helps,
0
Hi;
the .exe opens but you can't look it because it is chut automaticly
so i put befour the last } a cin of any changing for example
#include<iostream>
using namespace std;
int main()
{
int x;
// the treatment which you need to do
.....
........
.........
................
cin>>x; 
}

like this you will oblige the .exe to wait to receve an value and in the same time you can look at stages of runing

sorry if i done many mistakes
0
shariqDON Posts 10 Registration date Friday January 30, 2009 Status Member Last seen March 1, 2009 1
Feb 1, 2009 at 06:18 AM
whats compiler use to you
0