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() { }
2.1m questions
2.1m answers
60 comments
57.0k users