Click here to Skip to main content
15,911,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestiontITLE bAR Pin
nitin320-Jun-07 21:50
nitin320-Jun-07 21:50 
AnswerRe: tITLE bAR Pin
Matthew Faithfull20-Jun-07 22:47
Matthew Faithfull20-Jun-07 22:47 
QuestionRandom Child Menus in the Desktop Application Pin
Vasudevan Deepak Kumar20-Jun-07 20:53
Vasudevan Deepak Kumar20-Jun-07 20:53 
AnswerRe: Random Child Menus in the Desktop Application [modified] Pin
zhang80060520-Jun-07 21:57
zhang80060520-Jun-07 21:57 
QuestionWindowProc Pin
nitin320-Jun-07 20:48
nitin320-Jun-07 20:48 
AnswerRe: WindowProc Pin
Cedric Moonen20-Jun-07 21:06
Cedric Moonen20-Jun-07 21:06 
AnswerRe: WindowProc Pin
Mark Salsbery21-Jun-07 6:30
Mark Salsbery21-Jun-07 6:30 
QuestionCFile vs FILE* vs FSTREAM Pin
GameProfessor20-Jun-07 18:56
GameProfessor20-Jun-07 18:56 
There are several ways to access files when coding in visual C. We could use CFile, or FILE* or fstream. Which one is the best in term of performance and stability ?

What's your opinion ?

I used to think that CFile would be the best choice when we work with Windows (because it was written by Microsoft anyway).
But actually it's not. I have an application that do intensive disk read/write (it reads files from hard disk about 20 times per seconds) and I have checked it thoroughly to make sure there is no read/write conflict. If I use CFile, there is chance of about 5% it returns an error that it can't open file (mode: binary read) while the file is obviously available. If I replace that part with FILE* pointer (i.e. use fopen & fread) then It runs perfectly all the time.



AnswerRe: CFile vs FILE* vs FSTREAM Pin
User 58385220-Jun-07 19:30
User 58385220-Jun-07 19:30 
AnswerRe: CFile vs FILE* vs FSTREAM Pin
Matthew Faithfull20-Jun-07 21:50
Matthew Faithfull20-Jun-07 21:50 
GeneralRe: CFile vs FILE* vs FSTREAM Pin
GameProfessor20-Jun-07 22:46
GameProfessor20-Jun-07 22:46 
GeneralRe: CFile vs FILE* vs FSTREAM Pin
Matthew Faithfull20-Jun-07 23:00
Matthew Faithfull20-Jun-07 23:00 
Questionvirtual function Pin
paper6720-Jun-07 18:43
paper6720-Jun-07 18:43 
AnswerRe: virtual function Pin
Nibu babu thomas20-Jun-07 18:51
Nibu babu thomas20-Jun-07 18:51 
GeneralRe: virtual function Pin
Mark Salsbery21-Jun-07 6:34
Mark Salsbery21-Jun-07 6:34 
QuestionCBrowseCtrl use Pin
Kryptech20-Jun-07 17:45
Kryptech20-Jun-07 17:45 
AnswerRe: CBrowseCtrl use Pin
Hamid_RT20-Jun-07 18:39
Hamid_RT20-Jun-07 18:39 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 2:22
Kryptech21-Jun-07 2:22 
AnswerRe: CBrowseCtrl use Pin
David Crow21-Jun-07 2:45
David Crow21-Jun-07 2:45 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:10
Kryptech21-Jun-07 3:10 
QuestionRe: CBrowseCtrl use Pin
David Crow21-Jun-07 3:18
David Crow21-Jun-07 3:18 
AnswerRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:21
Kryptech21-Jun-07 3:21 
GeneralRe: CBrowseCtrl use Pin
David Crow21-Jun-07 3:28
David Crow21-Jun-07 3:28 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:38
Kryptech21-Jun-07 3:38 
GeneralRe: CBrowseCtrl use Pin
David Crow21-Jun-07 3:48
David Crow21-Jun-07 3:48 

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.