View Single Post
Old 06-13-2009, 12:01 PM   #1 (permalink)
At4ri
Registered User
 
Join Date: Jun 2009
Posts: 2
OS: Vista Service Pack 1


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.
At4ri is offline   Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here