parse error?

This is a discussion on parse error? within the Game Programming forums, part of the General Programming Boards category; this is part of a code for a switch statement. i keep getting parse error for the line with std::cin>>quit; ...

  1. #1
    lv.42 Berserker Drake's Avatar
    Join Date
    Jun 2005
    Posts
    67

    parse error?

    this is part of a code for a switch statement. i keep getting parse error for the line with std::cin>>quit;

    Code:
         case 3:
              char quit = 'y';
              std::cout<<"Are you sure (y\n): "
              std::cin>>quit;
              if(quit == 'y')
                        {
                        std::cout<<"Goodbye"<<std::endl;
                        }
               system("pause");         
               return 0;
        }  
    }

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    You missed a semi-colon
    Code:
              std::cout<<"Are you sure (y\n): ";
              std::cin>>quit;

  3. #3
    lv.42 Berserker Drake's Avatar
    Join Date
    Jun 2005
    Posts
    67
    Quote Originally Posted by Quantum1024
    You missed a semi-colon
    Code:
              std::cout<<"Are you sure (y\n): ";
              std::cin>>quit;

    omg....lol

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 02:07 AM
  2. How to monitor process creation?
    By markiz in forum Windows Programming
    Replies: 31
    Last Post: 03-17-2008, 02:39 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 06:33 AM
  4. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

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