<증감 연산자> ++, --, ++, --
<전위 증감 연산>
선 증감이 먼저 수행된 후 연산
int A = 0;
int Total = 0;
Total = ++A;
cout << Total << " , " << A << endl;
-결과-
Total = 1
A = 1
<후위 증감 연산자>
선 연산 후 증감이 일어난다.
int A = 0;
int Total = 0;
Total = A++;
cout << Total << " , " << A << endl;
-결과-
Total = 0
A = 1
<헝가리안 표기법>
char chTest;
short nTest;
int iTest;
long lTest;
long long llTest;
float fTest;
double dTest;
long double ldTest;
'프로그래밍 > C++' 카테고리의 다른 글
while (반복문) (0) | 2021.09.10 |
---|---|
분기문 (if, switch, goto, while) (0) | 2021.09.10 |
형변환 (0) | 2021.09.10 |
연산자 (0) | 2021.09.07 |
자료형 (0) | 2021.09.07 |