Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CPropertySheet CPropertyPage quirk Pin
valikac21-Jul-03 19:32
valikac21-Jul-03 19:32 
GeneralRe: CPropertySheet CPropertyPage quirk Pin
Ben80522-Jul-03 7:41
Ben80522-Jul-03 7:41 
QuestionDrive letter? Pin
Bob Stanneveld21-Jul-03 11:17
Bob Stanneveld21-Jul-03 11:17 
AnswerRe: Drive letter? Pin
J. Dunlap21-Jul-03 11:39
J. Dunlap21-Jul-03 11:39 
GeneralRe: Drive letter? Pin
Bob Stanneveld21-Jul-03 12:05
Bob Stanneveld21-Jul-03 12:05 
QuestionFast read in data? Pin
Kevein21-Jul-03 11:15
Kevein21-Jul-03 11:15 
AnswerRe: Fast read in data? Pin
Neville Franks21-Jul-03 12:02
Neville Franks21-Jul-03 12:02 
AnswerRe: Fast read in data? Pin
Bob Stanneveld21-Jul-03 12:02
Bob Stanneveld21-Jul-03 12:02 
Why not mix with C, the CStdioFile::ReadString() calls _fgetts() (a C function!)...

Is the data on a single line or are there any cr/lf pairs?

I'll continue assuming that there are not!
Since _fgetts() reads the data character by character this solution works faster and it saves you the time of splitting the strings!

int nRead = 0; // number of bytes read
char cBuf = 0; // charBuffer
char szNumber[100]; // the string to use with atof

for(int nIndex = 0;;nIndex++)
{
::ReadFile((HANDLE)CStdioFile::m_hFile, &cBuf, 1, &nRead, NULL)
if(cBuf == EOF)
break;
if(cBuf == ',')
{
szNumber[nIndex] = '\0';
// add to your 2d array here with atof()
}
else
szNumber[nIndex] = cBuf;
}


this should work faster!
good luck.
GeneralEnabling a project for context sensitive help Pin
haritadala21-Jul-03 10:19
haritadala21-Jul-03 10:19 
GeneralRe: Enabling a project for context sensitive help Pin
Toni7821-Jul-03 13:47
Toni7821-Jul-03 13:47 
GeneralIDE Dialog Problem Pin
Grahamfff21-Jul-03 10:08
Grahamfff21-Jul-03 10:08 
Generalpath to exe file Pin
martin_j21-Jul-03 8:11
martin_j21-Jul-03 8:11 
GeneralRe: path to exe file Pin
Larry Antram21-Jul-03 8:33
Larry Antram21-Jul-03 8:33 
GeneralRe: path to exe file Pin
Toni7821-Jul-03 9:24
Toni7821-Jul-03 9:24 
GeneralRe: path to exe file Pin
martin_j21-Jul-03 20:03
martin_j21-Jul-03 20:03 
GeneralRe: path to exe file Pin
Jens Doose21-Jul-03 22:20
Jens Doose21-Jul-03 22:20 
GeneralEmbedded HTML pages + images Pin
Tommy2k21-Jul-03 7:53
Tommy2k21-Jul-03 7:53 
GeneralRe: Embedded HTML pages + images Pin
Michael Dunn21-Jul-03 14:07
sitebuilderMichael Dunn21-Jul-03 14:07 
GeneralRe: Embedded HTML pages + images Pin
Tommy2k24-Jul-03 12:21
Tommy2k24-Jul-03 12:21 
GeneralRe: Embedded HTML pages + images Pin
Michael Dunn24-Jul-03 12:33
sitebuilderMichael Dunn24-Jul-03 12:33 
GeneralRe: Embedded HTML pages + images Pin
Tommy2k24-Jul-03 22:58
Tommy2k24-Jul-03 22:58 
QuestionResizing image right bottom? Pin
Dominik Reichl21-Jul-03 7:26
Dominik Reichl21-Jul-03 7:26 
AnswerRe: Resizing image right bottom? Pin
J. Dunlap21-Jul-03 8:17
J. Dunlap21-Jul-03 8:17 
GeneralRe: Resizing image right bottom? Pin
Dominik Reichl21-Jul-03 9:12
Dominik Reichl21-Jul-03 9:12 
GeneralRe: Resizing image right bottom? Pin
Dominik Reichl21-Jul-03 9:28
Dominik Reichl21-Jul-03 9:28 

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.