Basic class implementation in C