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

C / C++ / MFC

 
QuestionHow to write programt to create folder? Pin
ooosawaddee324-Mar-03 20:03
ooosawaddee324-Mar-03 20:03 
AnswerRe: How to write programt to create folder? Pin
Rickard Andersson2024-Mar-03 21:43
Rickard Andersson2024-Mar-03 21:43 
GeneralRe: How to write programt to create folder? Pin
Simon.W25-Mar-03 0:35
Simon.W25-Mar-03 0:35 
GeneralCTreeCtrl with icons Pin
rohit.dhamija24-Mar-03 19:24
rohit.dhamija24-Mar-03 19:24 
GeneralRe: CTreeCtrl with icons Pin
Tibor Blazko24-Mar-03 19:36
Tibor Blazko24-Mar-03 19:36 
GeneralRe: CTreeCtrl with icons Pin
jeremysay24-Mar-03 22:39
jeremysay24-Mar-03 22:39 
GeneralQuadratic equation Pin
ROK_RShadow24-Mar-03 19:01
ROK_RShadow24-Mar-03 19:01 
GeneralRe: Quadratic equation Pin
Roger Wright24-Mar-03 20:00
professionalRoger Wright24-Mar-03 20:00 
Assuming that in both versions that

sc = sqrt(pow(b,2) - (4 * a * c))

the difference is that the first combines additive terms before dividing by (2 * a), while the second performs the division on each term before adding. The two approaches are equivalent, and both will give the same wrong answer most of the time by casting a result that is very rarely an integer to int. Also, since dFirst and dSecond are declared as type float you lose precision, as the float type is limited to about 6 digits of precision. I'd stick to using double variables for the calculation, then convert to float for the output if necessary for some reason.

Ancient man conquered his rivals with the jawbone of an ass; modern man uses the jawbone of a politician.
GeneralRe: Quadratic equation Pin
ROK_RShadow24-Mar-03 20:35
ROK_RShadow24-Mar-03 20:35 
GeneralRe: Quadratic equation Pin
Roger Wright24-Mar-03 21:17
professionalRoger Wright24-Mar-03 21:17 
GeneralRe: Quadratic equation Pin
ROK_RShadow24-Mar-03 21:28
ROK_RShadow24-Mar-03 21:28 
GeneralRe: Quadratic equation Pin
Roger Wright24-Mar-03 22:07
professionalRoger Wright24-Mar-03 22:07 
QuestionIs there a function to convert a CString value to an integer? Pin
julych24-Mar-03 18:30
julych24-Mar-03 18:30 
AnswerRe: Is there a function to convert a CString value to an integer? Pin
Michael Dunn24-Mar-03 19:10
sitebuilderMichael Dunn24-Mar-03 19:10 
GeneralRe: Is there a function to convert a CString value to an integer? Pin
r i s h a b h s25-Mar-03 17:01
r i s h a b h s25-Mar-03 17:01 
GeneralDynamic allocation of 2-d array using 'new' Pin
natiekyle24-Mar-03 18:05
natiekyle24-Mar-03 18:05 
GeneralRe: Dynamic allocation of 2-d array using 'new' Pin
Nick Parker24-Mar-03 18:20
protectorNick Parker24-Mar-03 18:20 
QuestionHow to find data in database ? Pin
ooosawaddee324-Mar-03 15:21
ooosawaddee324-Mar-03 15:21 
AnswerRe: How to find data in database ? Pin
Anonymous24-Mar-03 15:37
Anonymous24-Mar-03 15:37 
GeneralRe: How to find data in database ? Pin
ooosawaddee324-Mar-03 15:56
ooosawaddee324-Mar-03 15:56 
GeneralRe: How to find data in database ? Pin
Anonymous24-Mar-03 16:14
Anonymous24-Mar-03 16:14 
AnswerRe: How to find data in database ? Pin
Christian Graus24-Mar-03 16:56
protectorChristian Graus24-Mar-03 16:56 
GeneralRe: How to find data in database ? Pin
Nick Parker24-Mar-03 18:24
protectorNick Parker24-Mar-03 18:24 
GeneralHtmlHelp events Pin
trimtrom24-Mar-03 14:54
trimtrom24-Mar-03 14:54 
GeneralRe: HtmlHelp events Pin
Taka Muraoka24-Mar-03 15:02
Taka Muraoka24-Mar-03 15:02 

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.