tutorial2.cpp: In function ‘int main()’:
tutorial2.cpp:7:4: error: ‘vector’ was not declared in this scope
vector<int> v;
^
tutorial2.cpp:7:4: note: suggested alternative:
In file included from /usr/include/c++/4.9/vector:64:0,
from tutorial2.cpp:3:
/usr/include/c++/4.9/bits/stl_vector.h:214:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^
tutorial2.cpp:7:11: error: expected primary-expression before ‘int’
vector<int> v;
^
tutorial2.cpp:12:5: error: ‘v’ was not declared in this scope
v.push_back(a);
^
tutorial2.cpp:14:8: error: ‘v’ was not declared in this scope
sort(v.rbegin(),v.rend());
^
tutorial2.cpp:14:27: error: ‘sort’ was not declared in this scope
sort(v.rbegin(),v.rend());
^
tutorial2.cpp:14:27: note: suggested alternative:
In file included from /usr/include/c++/4.9/algorithm:62:0,
from tutorial2.cpp:2:
/usr/include/c++/4.9/bits/stl_algo.h:4705:5: note: ‘std::sort’
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^
tutorial2.cpp:8:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
tutorial2.cpp:11:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a);
^