I have a small question, if I have an class with members, for example like this
class CSelectPlayerData : public SqlQuery
{
public:
BYTE m_Member;
WORD m_Member2;
Load_Data(CSelectPlayerData, "SELECT Member, Member2 FROM TABLE);
MAKE_PARAM(m_Member, m_Member2);
}
What this code does, is that it loads data from sql table, and assigns them to Member and Member2. My question now is, if I use the query, and do something like this :
INIT_QUERY(db, CSelectPlayerData) //this also executes the LoadData etc (it's macro)
pPlayer->m_Member = query->m_Member;
...
and then make an separate class, CPlayer
CPlayer Player;
which has the same parameters (Member, Member2), can I somehow memcpy the values from the query's class to the player, so I don't have to do the
pPlayer->m_... = query->m_...
I know it's not really that useful, but it kinda would be just for my additional knowledge. Thanks for answers.