왜 class랑 struct를 혼용해서 쓰는지 궁금했었다.
test 프로그램 만들 때 멤버에 접근할 수 있어야 하는데 멤버를 private으로 막아놓고 함수로 통해 접근하게 하면 너무 번거롭다.
struct는 기본이 public이기 때문에 그냥 이걸로 쓰는거였다.
'---C++ 역량 강화--- > STL 공부' 카테고리의 다른 글
string class 문자열 합치기 (0) | 2024.06.03 |
---|---|
to_string, to_wstring (0) | 2024.06.03 |
partition, nth_element, partitial_sort, sort (0) | 2024.05.31 |
shuffle (0) | 2024.05.31 |
default_random_engine, distribute, random_device (0) | 2024.05.31 |