How to print out the contents of a vector?

后端 未结 19 1213
旧时难觅i
旧时难觅i 2020-11-22 03:46

I want to print out the contents of a vector in C++, here is what I have:

#include 
#include 
#include 
#include         


        
19条回答
  •  旧时难觅i
    2020-11-22 04:37

    #include
    using namespace std;
    
    int main()
    {
        vector  > v;
        int n;
        cin>>n;
    int i;
        for( i=0;i>str;
            cin>>end;
            v.push_back(make_pair(str,end));
        }
    
    
    
    for (int j=0;j

提交回复
热议问题