What’s the most interesting wrong view people have on the difference between structure and class in C++?
What’s the most interesting wrong view people have on the difference between structure and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For those who are interested in what the actual difference is, the default access specified for structs is public, and for classes it is private. There is no other difference.
See this related answer.
I can imagine a lot of people thinking that there will be a performance difference but there is not.