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.
我想知道如何获得大小std::tr1::array<int, 16> >?
std::tr1::array<int, 16> >
只是16*sizeof(int),16字节是怎么回事?
16*sizeof(int)
尝试sizeof(std::tr1::array<int, 16> >)
sizeof(std::tr1::array<int, 16> >)
是的,std::tr1::array保证是包装底层原始数组的聚合类型,实际上您可以使用data()成员函数访问它。原始数组的大小是元素数量乘以一个元素的大小。
std::tr1::array
data()