반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- singly Linked List
- Pair
- STL
- qsort
- red-black tree
- 알고리즘
- 총정리
- Heap
- sort
- Critical_Path_Analysis
- 5397
- 예제
- Articulation_Point
- 13305
- list
- Biconnected_Component
- 문법
- 자료구조
- template
- class_template
- sstream
- connected_component
- deletion
- c++
- data_structure
- Algorithm
- '0'
- 구현
- function_template
- 백준
Archives
- Today
- Total
- Today
- Total
- 방명록
어제의 나보다 성장한 오늘의 나
[c++] [자료형] int / double / char / float 크기 본문
반응형
c++ 에서 사용되는 메모리를 계산하다보면
변수 타입 마다 얼마의 메모리를 사용하는 지 궁금할 때가 있다.
그래서 오늘은 c++ 언어에서 각 자료형을 사용하는데 몇 byte가 드는지 알아보았다.
Coding
c++
닫기cout <<\
"sizeof_char : " << sizeof(char) << '\n' <<
"sizeof_int : " << sizeof(int) << '\n' <<
"sizeof_float : " << sizeof(float) << '\n' <<
"sizeof_double : " << sizeof(double);

반응형
'c++ > 문법' 카테고리의 다른 글
[C++] Unique 함수 정리 및 예제 (0) | 2022.02.13 |
---|---|
[c / c++] new / malloc / calloc /realloc 총 정리 & 예제 (0) | 2022.02.12 |
[C++] Sort 와 Compare 함수 (Greater , less) (0) | 2022.02.10 |
[C++] Pair 와 Tuple (0) | 2022.02.10 |
[c++] Template(템플릿) 총 정리 & 예제 (0) | 2022.02.10 |