Top 썸네일형 리스트형 C++ class keyword with data types C++에서 클래스 변수를 선언할 때 class 키워드를 사용하는 예 변수의 이름이 중복되는 경우 구별하기 위해서 class 키워드를 사용할 수 있다class T { public: class U; private: int U; }; int main() { int T; T t; // error: the local variable T is found class T t; // OK: finds ::T, the local variable T is ignored T::U* u; // error: lookup of T::U finds the private data member class T::U* u; // OK: the data member is ignored } 메소드 파라미터 변수를 선언할 때도 class 키워드.. 더보기 이전 1 2 3 4 5 6 7 ··· 2196 다음