+ 2

please explain output 1(how?) code is given in description.

#include<iostream> using namespace std; class A{}; int main() { A a; cout<<sizeof(a); return 0; }

2nd Sep 2017, 6:16 PM
Vikas Prajapat
Vikas Prajapat - avatar
1 Odpowiedź
+ 1
www.stroustrup.com/bs_faq2.html#sizeof-empty I hope this helps, but it's basically there cause you still need to distinguish objects between one another
4th Sep 2017, 8:38 AM
Jonhy