Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double to get decimal places 1

Status
Not open for further replies.

cyprus106

Programmer
Apr 30, 2001
654
God this is embarassing... But if you check my posting time, you'll understand.

Here's the exact code:
double secondBreakdown = WorldTimeTrackbar->Position / 4;

The position of the trackbar can be anywhere between 1 and 60, progressing by 1 each time. So it should be spitting me back decimal points, but it's not. Every time it's getting rounded to a whole number and I really need decimal places. And I don't know why... But the sun's about to rise, so I'm finally coming to ya'll for help. Please help!

Winner gets a star!!

Cyprus
 
I'm not familiar with WorldTimeTrackbar but have you tried:
double secondBreakdown = (float)WorldTimeTrackbar->Position / 4.0;



James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top