|
A problem with C++ program
I have a bit of a problem with my C++-programs. I get them to work and all that but when I want them to display an end result it goes wrong. It's not that it doesn't work it's just that the program closes itself before i get to view the result. Basicly i cant get the program to pause before closing down.
----------------------------------------------------
Ex
// convert.cpp
#include <iostream>
double stonetokg(double);
int main()
**
using namespace std;
double stone;
cout << "Input weight in stone:";
cin >> stone;
double kilo = stonetokg(stone);
cout << stone << " stone is ";
cout << kilo << " kilogram." << endl;
cin.get();
return 0;
}
double stonetokg(double sts)
**
return 6,35 * sts;
}
----------------------------------------------------
Don't know if it's a problem caused by vista or not.
Last edited by At4ri; 06-13-2009 at 12:04 PM.
|