decltype
![[C++] 변수(1)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FBmE3k%2FbtqyOUAxJZq%2FbW147ixAnVQ2OoqSzNAfx1%2Fimg.png)
[C++] 변수(1)
1. C언어와 다른 C++ 변수의 특징 - 함수의 중간에서 선언 가능 - 구조체 사용 시 struct를 표기하지 않아도 된다. - 구조체를 만들 때 멤버를 초기화 할 수 있다. - C++ 11이상 - 2진수 표기법 / 자릿수 표기법 - C에는 없는 새로운 데이터 타입 struct Rect { int x = 0; int y = 0; // 구조체 멤버 초기화 } int main() { if(true) {} int n = 0; // 함수 이후 변수 선언 가능 Rect rt; // C에서의 struct Rect rt; 에서 struct를 빼도 된다. int n1 = 10; // 10진수 int n2 = 0x10; // 16진수 int n3 = 010; // 8진수 int n4 = 0b10; // 2진수 int ..