0
help me,i want to print the number which i have assign 0 to 10 places;
#include<iostream> #include<vector> using namespace std; int main() { vector<int>*p=new vector<int>(10,0); cout<<p[0]; }
2 ответов
+ 25
Your vector is not a vector, it is a pointer to vector...
so u need to do something
like this 👇
cout << (*p)[0];
to print the elements...
0
thanks :)