nakka soft world !
Auto / decltype 본문
728x90
int x[] = {1,2,3,4,5,6,7,8,9}
auto n1 = x[3]; // 좌변의 타입이 자동으로 결정됨.
decltype(n1) n2; // n1과 동일한 타입의 변수 선언
728x90
'프로그래밍언어 > C++' 카테고리의 다른 글
Function Overloading (0) | 2017.03.14 |
---|---|
default parameter (0) | 2017.03.14 |
ranged for (0) | 2017.03.09 |
using (template alias) (0) | 2017.03.09 |
nullptr (0) | 2017.03.09 |
Comments