[C/C++] 이름 숨김(Name Hiding) 자식 클래스가 부모 클래스에 정의된 멤버(함수, 변수 등)를 새로 정의 하면 부모 클래스의 같은 이름을 가진 멤버는 숨겨지는 것을 이름 숨김이라고 함 ex) BaseClass에 int / std::string 파라미터를 받는 두개의 Func이 정의되어있고 자식 클래스에서 int 파라미터 Func만 재정의 한 경우class BaseClass{public: virtual void Func(int inParam) { } virtual void Func(std::string& inStr) { }};class DerivedClass : BaseClass{public: // int 파라미터를 받는 함수만 오버라이딩 virtual void Func(int inParam).. 2025. 4. 27. [C++] Platform Define Platform DefineWindows_WIN32Apple__APPLE__ Linux __linux__ 사용 예제#ifdef _WIN32 // define something for windows (32-bit and 64-bit, this part is common) #ifdef _WIN64 // define something for windows (64-bit only) #endif#elif __APPLE__ #include “TargetConditionals.h” #if TARGET_IPHONE_SIMULATOR #elif TARGET_OS_IPHONE #e.. 2024. 5. 2. 이전 1 다음