GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Jun-2009, 22:46
tuxor tuxor is offline
New Member
 
Join Date: Jun 2009
Posts: 2
tuxor is on a distinguished road

Error: expected unqualified-id before ‘{’ token


Hello, Im very new to C++ and I'm trying to make a simple program and i keep getting this error "error: expected unqualified-id before ‘{’ token" not sure what to do
CPP / C++ / C Code:
#include <iostream>


using namespace std;

int main();
{
    int;
    char response;

    cout<<"Ohi! I sees you has a CheeseBurger, I can has ? Type (yes or no): ";
    cin>> response;
    if ( response == yes) {
            cout<< "May the lolcat be with you!\n";
}
    if ( response == no) {
        cout<< "The rath of 10000 lolcats atack you steals your cheeseburger !\n";
}
Last edited by LuciWiz : 15-Jun-2009 at 02:08. Reason: Please insert your C++ code between [cpp] & [/cpp] tags
  #2  
Old 14-Jun-2009, 23:15
tuxor tuxor is offline
New Member
 
Join Date: Jun 2009
Posts: 2
tuxor is on a distinguished road

Re: error: expected unqualified-id before ‘{’ token


Fixed

CPP / C++ / C Code:
#include <iostream>


using namespace std;

int main()
{

    char response;

    std::cout<<"Ohi! I sees you has a CheeseBurger, I can has ? Type (yes or no): ";
    cin>> response;
    if ( response =='y') {
            cout<< "May the lolcat be with you!\n";
}
    if ( response =='n' ) {
        std::cout<< "The rath of 10000 lolcats atack you steals your cheeseburger !\n";
    }
}
Last edited by LuciWiz : 15-Jun-2009 at 02:35. Reason: Please insert your C++ code between [cpp] & [/cpp] tags
 
 

Recent GIDBlogReview: Gel laptop cooling pad by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expected primary-expression before '.' token dinh0wjr C Programming Language 2 30-Mar-2009 13:13
error: expected primary-expression before '.' token Honourable Mist C++ Forum 11 18-Feb-2006 13:15
error: parse error before `&' token jake_jeckel C++ Forum 5 03-Oct-2005 10:48
Replacing N'th token in a file. kobi_hikri C Programming Language 2 24-Jun-2005 03:00
storing a token pointer as a string CoreLEx C Programming Language 1 07-Oct-2003 12:33

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:26.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.