i would use a constructor because its an easy way to set all of your player parameters on one line
so instead of something like
void makeplayer()
{
player.id = 1;
player.Xpos = 10.0f;
player.Ypos = 10.0f;
player.Zpos = 10.0f;
player.speed = 2.4f;
}
in your main code, you could write this in your class :
player::player(int Id,float X, float Y, float Z,float Speed)
{
Xpos = X;
Ypos = Y;
id = Id;
speed = Speed;
dbMakeObjectCube(3,5);
dbPositionObject(Id,X,Y,Z);
}
using the constructor you can now create your player like this in your main code
player Player1(1,10.0f,10.0f,10.0f,2.4f);
player Player2(2,10.0f,10.0f,20.0f,2.4f);
etc....
destructors are useful and you can use that to clean up anything that is still in memory
player::~player()
{
dbDeleteObject(id);
}
its best to read up on a good tutorial about constructor/destructor uses. they are handy though. hope this helped a little bit (im not the best example giver or coder)
void Void(void){(for i = 0; i < i+1; i++){cout<<"bubzy rules "};}