# include
#include
#include
#include
The message dev is
In the function 'int main ()' :
[Error] request for member 'push_back' in 'v. td: : vector
(((STD: : vector : : size_type) a)) ', which is of non - class type '__gnu_cxx: : __alloc_traits & lt; STD: : allocator : : value_type (aka int} '
14 8 [Error] request for member 'push_back' in 'v. td: : vector (((STD: : vector B: : size_type))) ', which is of non - class type '__gnu_cxx: : __alloc_traits & lt; STD: : allocator : : value_type (aka int} '
25 23 [Error] request for member 'size' 'in v. td: : vector (((STD: : vector : : size_type) I)) ', which is of non - class type '__gnu_cxx: : __alloc_traits & lt; STD: : allocator : : value_type (aka int} '
26 20 [Error] no match for the call to '(STD: : set) (int&) '
Please ask, what circumstance, this?
CodePudding user response:
It is wrong to your understanding of the vector
vector XXX (1000) on behalf of the initialization of a length of 1000 vector ; The equivalent of int x [1000];
The vector [a] returns an object, his inner is actually an int