c++ Class & Structure

Welcome to your c++ Class & Structure

The difference between a c++ class and a struct?
Is this valid constructor code inside a class called Entity?
Entity()
   :m_age(23),m_height(176),m_name("Unknown"){}
Is this valid constructor code
inside a class called Entity?
Entity(){
   :m_age=23,m_height=176;
}
Structs are public by default, right?
Can a its private member be
changed by an assignment in main()?

Leave a Reply

Top