c++ class public and private