Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to initialize DAO/Jet db engine error on clean win98 system Pin
Tomasz Sowinski16-May-01 3:49
Tomasz Sowinski16-May-01 3:49 
GeneralRe: Unable to initialize DAO/Jet db engine error on clean win98 system Pin
Rob Bechamp16-May-01 4:30
Rob Bechamp16-May-01 4:30 
GeneralRe: Unable to initialize DAO/Jet db engine error on clean win98 system Pin
16-May-01 4:40
suss16-May-01 4:40 
GeneralRe: Unable to initialize DAO/Jet db engine error on clean win98 system Pin
Tomasz Sowinski16-May-01 4:42
Tomasz Sowinski16-May-01 4:42 
GeneralRe: Unable to initialize DAO/Jet db engine error on clean win98 system Pin
Rob Bechamp16-May-01 5:17
Rob Bechamp16-May-01 5:17 
GeneralSystem Specs Pin
16-May-01 3:20
suss16-May-01 3:20 
GeneralC++ Misery Pin
16-May-01 0:33
suss16-May-01 0:33 
GeneralRe: C++ Misery Pin
#realJSOP16-May-01 0:51
professional#realJSOP16-May-01 0:51 
Assuming your ifile->eof() function performs a valid test for end of file, try it this way:

bool pPolyhedra::getfield(char *fieldname, CString& out) 
{
    BOOL bFoundField = FALSE;

    while (!ifile->eof()) 
    {
        ifile->getline(linebuffer, 255, '\n'); 
        a = linebuffer;
        if (a.Find(fieldname) == -1)
        {
            bFoundField = TRUE;
            break;
        }
    } 

    if (!bFoundField)
    {
        return FALSE;
    }

    ifile->getline(linebuffer, 255, '\n'); 
    out = linebuffer; 
    out.TrimRight(); 
    return true;
}


If it were me, I'd also use the MFC CStdioFile class for reading the file. Smile | :)
GeneralNT Service shutdown. Pin
Flit16-May-01 0:21
Flit16-May-01 0:21 
GeneralOwnerdrawn ListBox and Tab Stops Pin
Baz16-May-01 0:17
Baz16-May-01 0:17 
GeneralRe: Ownerdrawn ListBox and Tab Stops Pin
Tomasz Sowinski16-May-01 0:28
Tomasz Sowinski16-May-01 0:28 
GeneralRe: Ownerdrawn ListBox and Tab Stops Pin
Baz16-May-01 0:39
Baz16-May-01 0:39 
GeneralHiding the messageboxes that appear on file errors Pin
Joan M15-May-01 23:37
professionalJoan M15-May-01 23:37 
GeneralRe: Hiding the messageboxes that appear on file errors Pin
Tomasz Sowinski16-May-01 0:03
Tomasz Sowinski16-May-01 0:03 
GeneralRe: Hiding the messageboxes that appear on file errors Pin
Joan M16-May-01 4:58
professionalJoan M16-May-01 4:58 
GeneralRe: Hiding the messageboxes that appear on file errors Pin
Tomasz Sowinski16-May-01 5:15
Tomasz Sowinski16-May-01 5:15 
GeneralFlushing data into the registry (How to?) Pin
Joan M15-May-01 23:21
professionalJoan M15-May-01 23:21 
Questionhow to change a char to an int Pin
hearties15-May-01 22:28
hearties15-May-01 22:28 
AnswerRe: how to change a char to an int Pin
Christian Graus15-May-01 22:31
protectorChristian Graus15-May-01 22:31 
GeneralRe: how to change a char to an int Pin
hearties15-May-01 22:36
hearties15-May-01 22:36 
GeneralRe: how to change a char to an int Pin
Christian Graus15-May-01 22:43
protectorChristian Graus15-May-01 22:43 
AnswerRe: how to change a char to an int Pin
Michael Dunn16-May-01 5:34
sitebuilderMichael Dunn16-May-01 5:34 
GeneralThe good use of AddDocTemplate() Pin
15-May-01 21:33
suss15-May-01 21:33 
GeneralSMTP - Client Pin
Gunnar Mätzler15-May-01 20:57
Gunnar Mätzler15-May-01 20:57 
GeneralRe: SMTP - Client Pin
markkuk16-May-01 1:05
markkuk16-May-01 1:05 

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.