Click here to Skip to main content
16,011,947 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Time measure Pin
igor196019-Nov-03 9:57
igor196019-Nov-03 9:57 
GeneralRe: Time measure Pin
David Crow19-Nov-03 10:09
David Crow19-Nov-03 10:09 
GeneralRe: Time measure Pin
igor196019-Nov-03 10:41
igor196019-Nov-03 10:41 
GeneralRe: Time measure Pin
Peter Molnar19-Nov-03 12:57
Peter Molnar19-Nov-03 12:57 
Generalatoi and cstring Pin
ns19-Nov-03 2:57
ns19-Nov-03 2:57 
GeneralRe: atoi and cstring Pin
David Crow19-Nov-03 3:16
David Crow19-Nov-03 3:16 
GeneralRe: atoi and cstring Pin
ns19-Nov-03 6:03
ns19-Nov-03 6:03 
GeneralRe: atoi and cstring Pin
David Crow19-Nov-03 6:18
David Crow19-Nov-03 6:18 
So your file should look like:

123
456
004
991
...


and you want to ensure that someone hasn't changed it to:

07b
1c8
004
3df
...


Is that an accurate assesment? If so, you'll need to employ ReadString() to read each line from the file and parse the data yourself, something like:

CString strLine;
while (...)
{
    file.ReadString(strLine);
    if (! IsAllNumbers(strLine))
        AfxMessageBox(...);
}
 
bool IsAllNumbers( LPCSTR lpszData )
{
    while ('\0' != *lpszData)
    {
        if (isdigit(*lpszData))
            lpszData++;
        else
            return false;
    }
    
    return true;
}



Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?

GeneralRe: atoi and cstring Pin
ns19-Nov-03 7:17
ns19-Nov-03 7:17 
GeneralRe: atoi and cstring Pin
Peak19-Nov-03 3:21
Peak19-Nov-03 3:21 
GeneralRe: atoi and cstring Pin
Adam Gritt19-Nov-03 4:22
Adam Gritt19-Nov-03 4:22 
GeneralThanks Pin
ns19-Nov-03 6:00
ns19-Nov-03 6:00 
GeneralRe: atoi and cstring Pin
Terry O'Nolley19-Nov-03 10:13
Terry O'Nolley19-Nov-03 10:13 
QuestionHow to get the full path-name of 'My documents' in different OS? Pin
Grrrr19-Nov-03 1:24
Grrrr19-Nov-03 1:24 
AnswerRe: How to get the full path-name of 'My documents' in different OS? Pin
Peak19-Nov-03 2:00
Peak19-Nov-03 2:00 
GeneralRe: How to get the full path-name of 'My documents' in different OS? Pin
Grrrr19-Nov-03 2:19
Grrrr19-Nov-03 2:19 
AnswerRe: How to get the full path-name of 'My documents' in different OS? Pin
Michael P Butler19-Nov-03 3:32
Michael P Butler19-Nov-03 3:32 
AnswerRe: How to get the full path-name of 'My documents' in different OS? Pin
h43k4z19-Nov-03 8:36
h43k4z19-Nov-03 8:36 
GeneralCOM compiler support Pin
Kene19-Nov-03 1:15
Kene19-Nov-03 1:15 
GeneralRe: COM compiler support Pin
Adam Gritt19-Nov-03 4:29
Adam Gritt19-Nov-03 4:29 
GeneralHandling Threads Pin
Shenthil19-Nov-03 0:11
Shenthil19-Nov-03 0:11 
GeneralRe: Handling Threads Pin
David Crow19-Nov-03 3:20
David Crow19-Nov-03 3:20 
GeneralRe: Handling Threads Pin
valikac19-Nov-03 5:51
valikac19-Nov-03 5:51 
GeneralKernel32.dll Pin
hph18-Nov-03 23:18
hph18-Nov-03 23:18 
GeneralRe: Kernel32.dll Pin
Johann Gerell18-Nov-03 23:35
Johann Gerell18-Nov-03 23:35 

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.