What is the size of class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is the size of class?

just an class without any members and methods.

18th Feb 2017, 1:20 AM
Sri Ganapathy Sabari Nathan
Sri Ganapathy Sabari Nathan - avatar
1 Answer
+ 1
Use sizeof. For example, if you have a class named Foo, just use sizeof(Foo) will get the size of the class.
18th Feb 2017, 3:28 AM
Jian-hua Yeh
Jian-hua Yeh - avatar