I define a very simple vector: std::vector v; Then when I want to add an element to this vector I cannot reach to member functions of this vector: v.push_back(1); This code gives error "unknown type name v". I use QT Creator
my code:
#include <iostream>
#include <vector>
std::vector<int> v;
v //when I write this "unknown type name v" error comes out.
int main()
{
}
question from:https://stackoverflow.com/questions/65859484/stdvector-object-is-not-recognized-by-my-ide