Click here to Skip to main content
15,914,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDecimal number class Pin
paulb14-Oct-04 19:16
paulb14-Oct-04 19:16 
GeneralRe: Decimal number class Pin
toxcct14-Oct-04 19:50
toxcct14-Oct-04 19:50 
GeneralRe: Decimal number class Pin
paulb14-Oct-04 20:35
paulb14-Oct-04 20:35 
GeneralRe: Decimal number class Pin
Cedric Moonen14-Oct-04 20:49
Cedric Moonen14-Oct-04 20:49 
GeneralRe: Decimal number class Pin
toxcct14-Oct-04 22:37
toxcct14-Oct-04 22:37 
GeneralRe: Decimal number class Pin
jan larsen15-Oct-04 2:34
jan larsen15-Oct-04 2:34 
GeneralRe: Decimal number class Pin
markkuk15-Oct-04 0:06
markkuk15-Oct-04 0:06 
GeneralRe: Decimal number class Pin
David Crow15-Oct-04 6:25
David Crow15-Oct-04 6:25 
Technically, decimal means base-10 (deca is Greek for ten). So, rather than using a float type, are you wanting to use an int type?

If you simply need more precision, you might try the DECIMAL type. However, I suspect you are not having precision problems. Most beginners assume you can compare floating-point numbers just like you can non floating-point numbers. For example, this would never produce the desired result:

float a = 0.1;
if (a == 0.1)
    ...
because a is stored internally as 0.0999999999, give or take a few 9s.


"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow


GeneralSimple file I/O is giving me trouble Pin
georgiek5014-Oct-04 18:59
georgiek5014-Oct-04 18:59 
GeneralRe: Simple file I/O is giving me trouble Pin
Sujan Christo14-Oct-04 21:24
Sujan Christo14-Oct-04 21:24 
GeneralRe: Simple file I/O is giving me trouble Pin
Mad__14-Oct-04 22:22
Mad__14-Oct-04 22:22 
GeneralRe: Simple file I/O is giving me trouble Pin
David Crow15-Oct-04 7:56
David Crow15-Oct-04 7:56 
GeneralRe: Simple file I/O is giving me trouble Pin
georgiek5015-Oct-04 17:11
georgiek5015-Oct-04 17:11 
GeneralMenu shortcut keys Pin
Imtiaz Murtaza14-Oct-04 18:36
Imtiaz Murtaza14-Oct-04 18:36 
GeneralRe: Menu shortcut keys Pin
geo_m14-Oct-04 19:51
geo_m14-Oct-04 19:51 
GeneralRe: Menu shortcut keys Pin
Imtiaz Murtaza14-Oct-04 19:55
Imtiaz Murtaza14-Oct-04 19:55 
GeneralRe: Menu shortcut keys Pin
geo_m14-Oct-04 23:28
geo_m14-Oct-04 23:28 
Generalanalog clock Pin
Mr Bose Dayala14-Oct-04 18:01
Mr Bose Dayala14-Oct-04 18:01 
GeneralRe: analog clock Pin
ThatsAlok14-Oct-04 18:39
ThatsAlok14-Oct-04 18:39 
GeneralRe: analog clock Pin
Mr Bose Dayala14-Oct-04 19:27
Mr Bose Dayala14-Oct-04 19:27 
GeneralRe: analog clock Pin
ThatsAlok14-Oct-04 21:14
ThatsAlok14-Oct-04 21:14 
GeneralRe: analog clock Pin
Ryan Binns14-Oct-04 18:40
Ryan Binns14-Oct-04 18:40 
GeneralRe: analog clock Pin
V.14-Oct-04 22:46
professionalV.14-Oct-04 22:46 
QuestionHow to pass data to and from two forms? Pin
V5Dave14-Oct-04 15:59
V5Dave14-Oct-04 15:59 
AnswerRe: How to pass data to and from two forms? Pin
Sujan Christo14-Oct-04 19:22
Sujan Christo14-Oct-04 19:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.