I have recently come across a question in one of my interview.
What is the difference between C++ struct & class in terms of memory ??
I know they are same in all aspects except access specifiers while inheriting & in case of member variables.
Apart from this is there a real difference in terms of memory (may be memory allocation or destruction or memory management whatever) ????
Edit: I am not pretty sure why did the interviewer asks this question when there is no difference. I have found similar question here see the 2nd comment down to that link, he is asking a same question but no answer. I think there should be a diff.
Thanks In Advance.