Click here to Skip to main content
16,014,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can Place a Static text over a .BMP ? Pin
ThatsAlok19-Aug-08 20:31
ThatsAlok19-Aug-08 20:31 
GeneralRe: How can Place a Static text over a .BMP ? Pin
Hamid_RT19-Aug-08 21:19
Hamid_RT19-Aug-08 21:19 
GeneralRe: How can Place a Static text over a .BMP ? Pin
ThatsAlok19-Aug-08 22:43
ThatsAlok19-Aug-08 22:43 
GeneralRe: How can Place a Static text over a .BMP ? Pin
Hamid_RT20-Aug-08 2:20
Hamid_RT20-Aug-08 2:20 
QuestionExact value of ULONGLONG and longdouble ! Pin
Le@rner18-Aug-08 0:22
Le@rner18-Aug-08 0:22 
AnswerRe: Exact value of ULONGLONG and longdouble ! PinPopular
Redeye9218-Aug-08 0:50
Redeye9218-Aug-08 0:50 
GeneralRe: Exact value of ULONGLONG and longdouble ! [modified] Pin
Cedric Moonen18-Aug-08 1:26
Cedric Moonen18-Aug-08 1:26 
AnswerRe: Exact value of ULONGLONG and longdouble ! [modified] Pin
Cedric Moonen18-Aug-08 0:56
Cedric Moonen18-Aug-08 0:56 
The problem is because you are dividing by an integer. Thus, the compiler will implicitely cast your double into an integer in order to make an integer division (thus, the result will be an integer).Try this:
test = test + 1024.0;
final = test/1048576.0;


EDIT: as I explained here[^], I was not very awake this morning Poke tongue | ;-P . So, once you have at least one double in the operands, then the result will be a double too. If both operands are integers, then the result is an integer too.

Cédric Moonen
Software developer

Charting control [v1.4]
OpenGL game tutorial in C++ [Part 2 online]

modified on Monday, August 18, 2008 8:23 AM

GeneralRe: Exact value of ULONGLONG and longdouble ! Pin
Mark Salsbery18-Aug-08 8:11
Mark Salsbery18-Aug-08 8:11 
GeneralRe: Exact value of ULONGLONG and longdouble ! Pin
Cedric Moonen18-Aug-08 8:27
Cedric Moonen18-Aug-08 8:27 
GeneralRe: Exact value of ULONGLONG and longdouble ! Pin
Mark Salsbery18-Aug-08 8:33
Mark Salsbery18-Aug-08 8:33 
AnswerRe: Exact value of ULONGLONG and longdouble ! Pin
CPallini18-Aug-08 0:59
mveCPallini18-Aug-08 0:59 
GeneralRe: Exact value of ULONGLONG and longdouble ! Pin
Hamid_RT18-Aug-08 4:27
Hamid_RT18-Aug-08 4:27 
AnswerRe: Exact value of ULONGLONG and longdouble ! Pin
David Crow18-Aug-08 5:25
David Crow18-Aug-08 5:25 
QuestionHow to store and retrieve the image into a file. Pin
Bernaad17-Aug-08 23:17
Bernaad17-Aug-08 23:17 
AnswerRe: How to store and retrieve the image into a file. Pin
Cedric Moonen17-Aug-08 23:23
Cedric Moonen17-Aug-08 23:23 
GeneralRe: How to store and retrieve the image into a file. Pin
Bernaad17-Aug-08 23:37
Bernaad17-Aug-08 23:37 
GeneralRe: How to store and retrieve the image into a file. Pin
Cedric Moonen17-Aug-08 23:50
Cedric Moonen17-Aug-08 23:50 
AnswerRe: How to store and retrieve the image into a file. Pin
CPallini17-Aug-08 23:35
mveCPallini17-Aug-08 23:35 
JokeRe: How to store and retrieve the image into a file. Pin
Rajesh R Subramanian18-Aug-08 0:01
professionalRajesh R Subramanian18-Aug-08 0:01 
GeneralRe: How to store and retrieve the image into a file. Pin
CPallini18-Aug-08 0:06
mveCPallini18-Aug-08 0:06 
GeneralOT (of course) - Someone changed his mind Pin
CPallini18-Aug-08 3:34
mveCPallini18-Aug-08 3:34 
GeneralRe: OT (of course) - Someone changed his mind Pin
Rajesh R Subramanian18-Aug-08 19:41
professionalRajesh R Subramanian18-Aug-08 19:41 
GeneralRe: OT (of course) - Someone changed his mind Pin
CPallini18-Aug-08 21:15
mveCPallini18-Aug-08 21:15 
AnswerRe: How to store and retrieve the image into a file. Pin
Hamid_RT18-Aug-08 4:51
Hamid_RT18-Aug-08 4:51 

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.