yes, player is a type (like int float char etc..), not an object(variable), you can make a variable of the type player and use the dot (.) to access the members
so
player PLAYER;
PLAYER.speed = something;
the :: operator is used for the scope, if you want to define a function that is declared inside a class/struct, you can use it, e.g.
class player
{
public:
void Attack ( void );//prototype
}
void player::Attack ( void )
{
//define function body
}
hope it makes sense
also, you need to set the access level to public in order to access them from outside the class, for example, the default access level for classes is private, which means that they can't be accessed from outside the class, so if we have
class something
{
//private: (not necessary, it's private by default)
int x;
};
something sm;
sm.x = 0; //ERROR: you are trying to access a private member of "something" class
you could use public: access level so you can access it from anywhere
class access
{
//private members
int x;
int y;
public:
//public members
int z;
int w;
void MYFUNCTION ( void );
protected:
float h;
};
void access::MYFUNCTION ( void )
{
x = y = z = w = h = 0; //this function is inside the class, and thus can access private (and protected) members
}
access myClass;
myClass.x = 0; //ERROR: private members
myClass.z = 1; //fine: public member
myClass.h = 1; //ERROR: protected member
myClass.MYFUNCTION ( ); //fine: public member
note the protected access level, it is mainly used for inheritance and friendship, you should read some more about classes