12/05/17 00:12:52.18 lbGUPy7y
俺ならこうだな
変数は構造体の中にまとめる
変数が増えても構造体をいじるだけでいい
typedef struct xyz
{
int x;
int y;
int z;
}stXYZ;
class Constructor
{
private:
stXYZ xyz;
public:
Constructor(stXYZ *pstTmp)
{
memcpy(&xyz,pstTmp,sizeof xyz);
}
};
//呼び出し側
stXYZ stTmp = {1,2,3};
Constructor constructor(&stTmp);