prog.cpp:2:10: error: variable or field ‘sum’ declared void
void sum(vector<pair<int,int>>v);
^~~~~~
prog.cpp:2:10: error: ‘vector’ was not declared in this scope
prog.cpp:2:10: note: suggested alternative:
In file included from /usr/include/c++/8/vector:64,
from /usr/include/c++/8/queue:61,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:86,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_vector.h:339:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
prog.cpp:2:17: error: ‘pair’ was not declared in this scope
void sum(vector<pair<int,int>>v);
^~~~
prog.cpp:2:17: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/istream:38,
from /usr/include/c++/8/sstream:38,
from /usr/include/c++/8/complex:45,
from /usr/include/c++/8/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: ‘std::pair’
struct pair
^~~~
prog.cpp:2:22: error: expected primary-expression before ‘int’
void sum(vector<pair<int,int>>v);
^~~
prog.cpp:2:26: error: expected primary-expression before ‘int’
void sum(vector<pair<int,int>>v);
^~~
prog.cpp: In function ‘int main()’:
prog.cpp:6:5: error: ‘cin’ was not declared in this scope
cin>>t;
^~~
prog.cpp:6:5: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:75,
from prog.cpp:1:
/usr/include/c++/8/iostream:60:18: note: ‘std::cin’
extern istream cin; /// Linked to standard input
^~~
prog.cpp:11:5: error: ‘vector’ was not declared in this scope
vector<pair<int,int>>v;
^~~~~~
prog.cpp:11:5: note: suggested alternative:
In file included from /usr/include/c++/8/vector:64,
from /usr/include/c++/8/queue:61,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:86,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_vector.h:339:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
prog.cpp:11:12: error: ‘pair’ was not declared in this scope
vector<pair<int,int>>v;
^~~~
prog.cpp:11:12: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/istream:38,
from /usr/include/c++/8/sstream:38,
from /usr/include/c++/8/complex:45,
from /usr/include/c++/8/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: ‘std::pair’
struct pair
^~~~
prog.cpp:11:17: error: expected primary-expression before ‘int’
vector<pair<int,int>>v;
^~~
prog.cpp:16:9: error: ‘v’ was not declared in this scope
v.push_back(make_pair(x,y));
^
prog.cpp:16:21: error: ‘make_pair’ was not declared in this scope
v.push_back(make_pair(x,y));
^~~~~~~~~
prog.cpp:16:21: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/istream:38,
from /usr/include/c++/8/sstream:38,
from /usr/include/c++/8/complex:45,
from /usr/include/c++/8/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:524:5: note: ‘std::make_pair’
make_pair(_T1&& __x, _T2&& __y)
^~~~~~~~~
prog.cpp:18:9: error: ‘v’ was not declared in this scope
sum(v);
^
prog.cpp:18:5: error: ‘sum’ was not declared in this scope
sum(v);
^~~
prog.cpp: At global scope:
prog.cpp:22:10: error: variable or field ‘sum’ declared void
void sum(vector<pair<int,int>>v)
^~~~~~
prog.cpp:22:10: error: ‘vector’ was not declared in this scope
prog.cpp:22:10: note: suggested alternative:
In file included from /usr/include/c++/8/vector:64,
from /usr/include/c++/8/queue:61,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:86,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_vector.h:339:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
prog.cpp:22:17: error: ‘pair’ was not declared in this scope
void sum(vector<pair<int,int>>v)
^~~~
prog.cpp:22:17: note: suggested alternative:
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/bits/char_traits.h:39,
from /usr/include/c++/8/ios:40,
from /usr/include/c++/8/istream:38,
from /usr/include/c++/8/sstream:38,
from /usr/include/c++/8/complex:45,
from /usr/include/c++/8/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/8/bits/stdc++.h:52,
from prog.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:208:12: note: ‘std::pair’
struct pair
^~~~
prog.cpp:22:22: error: expected primary-expression before ‘int’
void sum(vector<pair<int,int>>v)
^~~
prog.cpp:22:26: error: expected primary-expression before ‘int’
void sum(vector<pair<int,int>>v)
^~~