일상
sizeof vs alignof 본문
내가 설명하는 것 보다는 잘 정리된 글이 있어서 링크로 남긴다.
https://stackoverflow.com/questions/11386946/whats-the-difference-between-sizeof-and-alignof
What's the difference between sizeof and alignof?
What's the difference between sizeof and alignof? #include <iostream> #define SIZEOF_ALIGNOF(T) std::cout<< sizeof(T) << '/' << alignof(T) << std::endl int main(int...
stackoverflow.com
https://www.tutorialspoint.com/what-s-the-difference-between-sizeof-and-alignof
What's the difference between sizeof and alignof?
What's the difference between sizeof and alignof? Here we will see what are the differences of sizeof and the alignof operator in C++. The alognof() operator is introduced in C++11. The alignof() operator is used to get the alignment in bytes. It requires
www.tutorialspoint.com
alignment 관련 링크는 아래
https://thrillfighter.tistory.com/383
구조체 멤버 맞춤(struct member alignment) C++
아시는 분들도 계시고 모르시는 분들도 계실테지만 오늘은 구조체에 대한 내용을 분석해 보려합니다. 구조체는 일종의 데이터의 집합입니다. 그리고 클래스가 구조체의 업그레이드라고 아시고
thrillfighter.tistory.com
'programming' 카테고리의 다른 글
[c++] 백준 10988 (0) | 2023.05.25 |
---|---|
[c++] 백준 10809 (0) | 2023.05.22 |
[C++] switch 문 안에서 변수 선언 시 에러 발생 (0) | 2022.08.09 |
[ubuntu] tev - the exr viewer 설치 관련 (0) | 2022.08.09 |
[ubuntu] vscode C/C++ extension 자동완성(intellisense) 안되는 문제 (0) | 2022.08.08 |