Notice
Recent Posts
Recent Comments
«   2025/07   »
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 31
Archives
관리 메뉴

일상

sizeof vs alignof 본문

programming

sizeof vs alignof

Mysteryu 2022. 8. 20. 10:58

내가 설명하는 것 보다는 잘 정리된 글이 있어서 링크로 남긴다.

 

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

 

Comments