更新时间:2021-11-08 01:49:40
使用 vector :: size()
方法: i<v.size()
.
sizeof
运算符在编译时返回对象或表达式的字节大小,这对于 std :: vector
是恒定的.
The sizeof
operator returns the size in bytes of the object or expression at compile time, which is constant for a std::vector
.