Click here to Skip to main content
15,885,855 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get the process's DLL module address? Pin
Ghosuwa Wogomon2-Jul-13 7:30
Ghosuwa Wogomon2-Jul-13 7:30 
Questionis it possible to update a specific column in listview? Pin
JoneLe861-Jul-13 16:37
JoneLe861-Jul-13 16:37 
SuggestionRe: is it possible to update a specific column in listview? Pin
David Crow2-Jul-13 2:49
David Crow2-Jul-13 2:49 
QuestionCFile reads comma delimited text automatically? Pin
Vaclav_1-Jul-13 13:03
Vaclav_1-Jul-13 13:03 
AnswerRe: CFile reads comma delimited text automatically? Pin
SoMad1-Jul-13 14:47
professionalSoMad1-Jul-13 14:47 
QuestionRe: CFile reads comma delimited text automatically? Pin
Vaclav_2-Jul-13 4:04
Vaclav_2-Jul-13 4:04 
SuggestionRe: CFile reads comma delimited text automatically? Pin
David Crow2-Jul-13 4:09
David Crow2-Jul-13 4:09 
AnswerRe: CFile reads comma delimited text automatically? Pin
SoMad2-Jul-13 20:44
professionalSoMad2-Jul-13 20:44 
Sorry for the delay Vaclav, it has been one of those days.

I think you should do this with CStdioFile and get the text parsing all straightened out first. Follow David's advice for the read loop.

If you still want to do some testing with your current code, you need to clean up some things. You say you hope to read the whole file in and then process it. Well, then that is what you should do instead of doing both reading and processing in the loop.

I will recommend you use a CByteArray for the read buffer (I like its flexibility). Use CFile to check the size of the file, call SetSize() on the CByteArray object with that value, read the file in a single call (for now let's just assume your files will not be too large for that) and close the file. Then you use the loop to go through the buffer without doing anymore file handling.

Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

QuestionGetting the Command Line of Another Process Pin
Richard Andrew x641-Jul-13 10:58
professionalRichard Andrew x641-Jul-13 10:58 
AnswerRe: Getting the Command Line of Another Process Pin
Garth J Lancaster1-Jul-13 12:47
professionalGarth J Lancaster1-Jul-13 12:47 
GeneralRe: Getting the Command Line of Another Process Pin
Richard Andrew x641-Jul-13 13:14
professionalRichard Andrew x641-Jul-13 13:14 
GeneralRe: Getting the Command Line of Another Process Pin
Garth J Lancaster1-Jul-13 13:18
professionalGarth J Lancaster1-Jul-13 13:18 
SuggestionRe: Getting the Command Line of Another Process Pin
David Crow2-Jul-13 2:56
David Crow2-Jul-13 2:56 
GeneralRe: Getting the Command Line of Another Process Pin
Richard Andrew x642-Jul-13 10:15
professionalRichard Andrew x642-Jul-13 10:15 
QuestionResize bitmap from Clipborad? Pin
JoneLe8630-Jun-13 12:16
JoneLe8630-Jun-13 12:16 
AnswerRe: Resize bitmap from Clipborad? Pin
thanh_bkhn30-Jun-13 20:53
professionalthanh_bkhn30-Jun-13 20:53 
GeneralRe: Resize bitmap from Clipborad? Pin
JoneLe861-Jul-13 9:53
JoneLe861-Jul-13 9:53 
AnswerRe: Resize bitmap from Clipborad? Pin
Jochen Arndt30-Jun-13 21:01
professionalJochen Arndt30-Jun-13 21:01 
GeneralRe: Resize bitmap from Clipborad? Pin
JoneLe861-Jul-13 9:53
JoneLe861-Jul-13 9:53 
Questionhow to cal a single query in visual studio 2010 C++ instead of Stored procedure (Multiple queries)? Pin
kart 230-Jun-13 3:01
kart 230-Jun-13 3:01 
QuestionHow to read a excel file without using microsoft office in mfc? Pin
Le@rner28-Jun-13 22:34
Le@rner28-Jun-13 22:34 
AnswerRe: How to read a excel file without using microsoft office in mfc? Pin
Richard MacCutchan28-Jun-13 23:14
mveRichard MacCutchan28-Jun-13 23:14 
GeneralRe: How to read a excel file without using microsoft office in mfc? Pin
Le@rner29-Jun-13 0:23
Le@rner29-Jun-13 0:23 
GeneralRe: How to read a excel file without using microsoft office in mfc? Pin
Richard MacCutchan29-Jun-13 0:56
mveRichard MacCutchan29-Jun-13 0:56 
QuestionC#,How to parse CSV file with RegularExpression Pin
haha_c28-Jun-13 20:02
haha_c28-Jun-13 20: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.