View Single Post
Join Date: Oct 2006
Posts: 2,752
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 294
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Maven

Re: Help with Measurement converter

 
0
  #2
Nov 25th, 2008
2 things.
Change :
namespace std; to using namespace std; . Your code shouldn't compile without changing it.

then change:
  1. int Meters;
  2. int Yards;
to:
  1. double Meters;
  2. double Yards;

Int can only be integer values So: 1, 4 , 300, 5632 etc etc.
But you need some digits after the comma, so you need the double data-type
Last edited by niek_e; Nov 25th, 2008 at 6:45 am.
Reply With Quote