parser error...

This is a discussion on parser error... within the C++ Programming forums, part of the General Programming Boards category; Im trying to compile 'version 2' or a program ive been working on, and whenever I add this code to ...

  1. #1
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428

    parser error...

    Im trying to compile 'version 2' or a program ive been working on, and whenever I add this code to my previous code (which compiles fine) it gives me an error 'parse error at end of file' and the line number it gives says the final line in the source file. I can comment out this block of code and it works fine, so im not sure what the problem is.

    file.open(chatfile);
    cout << "Checking followup tags"<<endl;
    do{
    qfbreak=0;
    file>>tag; //grab the next string in the file
    if(!strcmpi("<question>", tag))
    {
    do{
    file>>tag;
    if((!strcmpi("<followup>", tag))||(!strcmpi("<afollowup>", tag)))

    {
    questionf[qfnum]=1;
    qfbreak=1;
    qfnum++;
    }


    while((!(!strcmpi("</question>", tag)))||(qfbreak==1));

    }
    while(!(!strcmpi("<end>", tag)));
    file.close();


    thanks!

    EDIT: Is there a way I can get it to format the text like i put it in...simmilar to the html pre tags?

  2. #2
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    From the code you posted it looks like you're missing a }.
    If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?

  3. #3
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    Ah! Stupid me, that was the problem. Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 04:09 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  5. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 11:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21