## What is the difference between the keywords struct and class in C++ ?? :) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

## What is the difference between the keywords struct and class in C++ ?? :)

3rd Feb 2017, 9:00 AM
Susan Mizan
Susan Mizan - avatar
2 Answers
+ 6
Exactly as pointed out by Bill. Structs are public by default, classes are private by default.
3rd Feb 2017, 9:36 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
I think the main difference is that a struct and it's methods/properties are public by default and a class is private by default.
3rd Feb 2017, 9:10 AM
Bill
Bill - avatar