일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- Pre-processing
- 반복문
- function
- array
- assignment operator
- 오블완
- string
- 백준
- OOP
- Python
- baekjoon
- programming
- Class
- pointer
- vscode
- 문자열
- predictive analysis
- 알고리즘
- 티스토리챌린지
- 파이썬
- Deep Learning
- const
- 함수
- Object Oriented Programming
- raw data
- Data Science
- 포인터
- 배열
- pass by reference
- C++
- Today
- Total
목록C++/기타 (16)
Channi Studies

lhs op= rhs 의 방식으로 작동한다. ex) cost += item * tax // cost = cost + (item * tax)

C++에서 boolean값을 기본적으로 1 for true, 0 for false로 출력된다. 하지만, true/false로 출력되는 것이 더욱 유용한 경우도 많다. 이럴 때, 코드에 cout
C++에서 정수끼리 나눗셈을 하게 되면, 소수점 이하의 숫자는 버려집니다. #include using namespace std; int main(){ int num1 = 10; int num2 = 3; float result = num1 / num2; cout
증감 연산자는 대상 값을 1씩 증가 혹은 감소시킵니다. (variable++: variable = variable + 1) (variable--: variable = variable - 1) 로 이해하면 좋습니다. 증감 연산자는 정수, 실수, 포인터 변수에서 사용 가능합니다. 증감 연산자에는 두가지 notation이 있습니다. Prefix notation: ++num Postfix notation: num++ 각각 증감 연산을 statement 이전에 적용할 지, statement 실행 이후에 적용할지를 결정합니다. // 증감 연산자 사용 예시 #include using namespace std; int main(){ int counter {10}; cout