공부/컴퓨터
멋진 코드~
찬
2005. 3. 4. 11:18
반응형
#include <iostream>
int main() { return 0; }
template<int i>
struct C : C<i-1> {
C() { std::cout << i << ". I will not throw paper airplanes in class\n"; }
};
template<> struct C<0> {};
C<500> c;
500은 499를 상속 받고, 499는 498을 상속 받고..
와~ 멋진코드~ ^_^
int main() { return 0; }
template<int i>
struct C : C<i-1> {
C() { std::cout << i << ". I will not throw paper airplanes in class\n"; }
};
template<> struct C<0> {};
C<500> c;
500은 499를 상속 받고, 499는 498을 상속 받고..
와~ 멋진코드~ ^_^
반응형