Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: editing read-only files Pin
ibtt114-Feb-07 4:32
ibtt114-Feb-07 4:32 
AnswerRe: editing read-only files Pin
jhwurmbach14-Feb-07 3:21
jhwurmbach14-Feb-07 3:21 
QuestionBItmap trail Pin
ceejeeb14-Feb-07 2:23
ceejeeb14-Feb-07 2:23 
QuestionRounding numbers (both ways) Pin
Johpoke14-Feb-07 1:35
Johpoke14-Feb-07 1:35 
AnswerRe: Rounding numbers (both ways) Pin
jhwurmbach14-Feb-07 1:45
jhwurmbach14-Feb-07 1:45 
AnswerRe: Rounding numbers (both ways) Pin
toxcct14-Feb-07 2:03
toxcct14-Feb-07 2:03 
AnswerRe: Rounding numbers (both ways) Pin
David Crow14-Feb-07 2:21
David Crow14-Feb-07 2:21 
AnswerRe: Rounding numbers (both ways) Pin
-Dy14-Feb-07 2:21
-Dy14-Feb-07 2:21 
Strings:

CString str;<br />
float f = 0.306;<br />
//float f = 12.0000000f;<br />
str.Format(_T("%.2g"), f);<br />
TRACE(_T("%s\n"), str);


Because I've used %g (instead of %f), 12.0 will be 12.

Numerics:
Take a look at this: http://www.codeproject.com/cpp/floatutils.asp[^]



- Dy

AnswerRe: Rounding numbers (both ways) Pin
#realJSOP14-Feb-07 10:25
professional#realJSOP14-Feb-07 10:25 
GeneralRe: Rounding numbers (both ways) Pin
Johpoke14-Feb-07 2:29
Johpoke14-Feb-07 2:29 
GeneralRe: Rounding numbers (both ways) Pin
toxcct14-Feb-07 2:30
toxcct14-Feb-07 2:30 
QuestionRe: Rounding numbers (both ways) Pin
Johpoke14-Feb-07 2:33
Johpoke14-Feb-07 2:33 
QuestionApplication Startup Pin
Robin Imrie14-Feb-07 1:22
professionalRobin Imrie14-Feb-07 1:22 
AnswerRe: Application Startup Pin
_AnsHUMAN_ 14-Feb-07 1:52
_AnsHUMAN_ 14-Feb-07 1:52 
GeneralRe: Application Startup Pin
Robin Imrie14-Feb-07 2:40
professionalRobin Imrie14-Feb-07 2:40 
QuestionRe: Application Startup Pin
David Crow14-Feb-07 2:22
David Crow14-Feb-07 2:22 
AnswerRe: Application Startup Pin
Robin Imrie14-Feb-07 2:44
professionalRobin Imrie14-Feb-07 2:44 
GeneralRe: Application Startup Pin
David Crow14-Feb-07 3:26
David Crow14-Feb-07 3:26 
GeneralRe: Application Startup Pin
Robin Imrie14-Feb-07 3:35
professionalRobin Imrie14-Feb-07 3:35 
QuestionRe: Application Startup Pin
David Crow14-Feb-07 3:53
David Crow14-Feb-07 3:53 
AnswerRe: Application Startup Pin
Robin Imrie14-Feb-07 4:08
professionalRobin Imrie14-Feb-07 4:08 
GeneralRe: Application Startup Pin
David Crow14-Feb-07 4:14
David Crow14-Feb-07 4:14 
GeneralRe: Application Startup Pin
Robin Imrie14-Feb-07 4:35
professionalRobin Imrie14-Feb-07 4:35 
GeneralRe: Application Startup Pin
David Crow14-Feb-07 4:43
David Crow14-Feb-07 4:43 
Questiondelete a directory Pin
sheetal_0614-Feb-07 1:10
sheetal_0614-Feb-07 1:10 

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.