Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の知る限り、 はsizeof返されません0が、次のプログラム:
sizeof
0
#include <iostream> class A { public: int a[0]; }; int main() { A obj; std::cout << sizeof(obj) << std::endl; }
出力します0。なんで?