Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 wow i cant find this mistake in these 6 lines of code
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
unholymight




PostPosted: Thu Nov 15, 2007 7:45 pm   Post subject: wow i cant find this mistake in these 6 lines of code

microsoft visual studio 2005

code:
        // Create Our OpenGL Window
        if (!CreateGLWindow("Yue Dong's Program v0.05",640,480,16,fullscreen))
        {
                return 0;                                                               // Quit If Window Was Not Created
        }

        //keys[VK_F1] = TRUE;

        /*Set up this player*/

        plane player(0,0);

        plane.set_angle(0.0);                  <-- syntax error here
        plane.set_turnspeed(0.2);                                   <-- syntax error here
        plane.set_planespeed(0.01);                         <-- syntax error here


1>xxx\game.cpp(529) : error C2143: syntax error : missing ';' before '.'
1>xxx\game.cpp(529) : error C2143: syntax error : missing ';' before '.'
1>xxx\game.cpp(530) : error C2143: syntax error : missing ';' before '.'
1>xxx\game.cpp(530) : error C2143: syntax error : missing ';' before '.'
1>xxx\game.cpp(531) : error C2143: syntax error : missing ';' before '.'
1>xxx\game.cpp(531) : error C2143: syntax error : missing ';' before '.'

they refer to the lines starting inclusively at plane.set_angle(0.0)

code:

void plane::set_angle(float value)
{
        angle = value;
}

void plane::set_turnspeed(float value)
{
        turnspeed = value;
}

void plane::set_planespeed(float value)
{
        planespeed = value;
}


thats what they call to, if you need more information i'll provide it, help me get down these bugs damn it
Sponsor
Sponsor
Sponsor
sponsor
Saad




PostPosted: Thu Nov 15, 2007 7:58 pm   Post subject: RE:wow i cant find this mistake in these 6 lines of code

Plane is a class, your declaring player to be an instance of player, but you use plane which should be player
unholymight




PostPosted: Thu Nov 15, 2007 8:04 pm   Post subject: Re: RE:wow i cant find this mistake in these 6 lines of code

Saad @ Thu Nov 15, 2007 7:58 pm wrote:
Plane is a class, your declaring player to be an instance of player, but you use plane which should be player


thanks a million, couldn't find that one for the life of me. BooHoo
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: