Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
Classes
What language-level difference applies to otherwise identical class and struct definition…
from Classes
C++23
beginner
1 min
What language-level difference applies to otherwise identical class and struct definitions?
Members and bases default to private for class and public for struct.
Only class can declare constructors and member functions.
Only struct objects can be copied memberwise.
A struct cannot inherit from another type.
Check
Ask AI about this kata
Report an error
next kata
Why should a member function that only reads object state usually have a trailing const?
Quiz
A new version is available
Reload