A simple C class simulation