vector size - 1 when size is 0 in C++

后端 未结 5 2196
渐次进展
渐次进展 2020-11-28 16:48

The following code

#include 
#include 
using namespace std;
int main() {
    vector value;
    cout << value.         


        
5条回答
  •  囚心锁ツ
    2020-11-28 17:24

    The .size() returns a 'size_t' type that is a unsigned int. The second output is the maximum integer of your machine.

提交回复
热议问题