Static
Typescript Class
Typescript Class
2021.11.27stShorthand Initialization typescript에서 class의 생성자를 좀 더 짧게 생성하는 법을 알아보겠습니다. Origin class Department { private id: string; public name: string; constructor(id: string, name: string) { this.id = id; this.name = name; } } Short class Department { constructor(private id: string, public name: string) { } describe() { console.log(`Department (${this.id}): ${this.name}`); } } constructro 파라미터에 private ..
c++ static member 변수
c++ static member 변수
2020.10.29class Something { public: static int s_value; }; int Something::s_value = 1; int main() { cout