0
Does a empty class object takes memory?
If we create a object of a class in which there is no variable ,will it take memory and if yes how much?
2 Respuestas
+ 2
According to C++ standard size of any class is at least 1 byte, even that class is empty.
+ 1
Yes. According to my test code a class always stores at least one byte:
https://code.sololearn.com/cZX5xuG1vkNY/?ref=app