Hi, I just found something to confuse me and nothing that would explain it to me. Seems like I got to ask another newbie question...
In a tutorial I found the following code:
At first it looked like a normal class, but then I saw the struct at the beginning.Code:struct CVector3 { public: float x, y, z; CVector3() {} CVector3(float fX, float fY, float fZ); CVector3 operator+(CVector3 vVector); CVector3 operator-(CVector3 vVector); CVector3 operator*(float fNum); CVector3 operator/(float fNum); };
Is this just "bad code" or is there a real meaning to this? If I replaced the struct with a class, would it make any difference ?



LinkBack URL
About LinkBacks
...


