Перейти к основному содержанию
Zoro
Вопросы
Таймер
Резервное копирование
Главная
/
♾️ C++
/
Вопросы 30
C++:
What is the difference between struct and class?
🎯
Режим фокуса
30
♾️
C++
🌱 junior
Снять отметку
What is the difference between struct and class?
Only
default access
differs.
cpp
Копировать
1
struct
S
{
int
x
;
}
;
// public
2
class
C
{
int
x
;
}
;
// private
struct — public by default.
class — private by default.
Больше вопросов по C++
What is C++ and what is it used for?
What are the main differences between C and C++?
What is the difference between struct and class in C++?
What are pointers and references in C++?
What is the difference between new and malloc?
What is the difference between public, protected, and private inheritance?
What is the difference between pointer and reference?
Назад к категории C++