prog.cpp:7:4: error: expected ‘;’ before ‘,’ token
T a,b;
^
prog.cpp:8:17: error: ‘T’ does not name a type
void plus(const T num1,const T num2){
^
prog.cpp:8:30: error: ‘T’ does not name a type
void plus(const T num1,const T num2){
^
prog.cpp: In function ‘int main()’:
prog.cpp:20:10: error: ‘b’ was not declared in this scope
cintype(b,a);
^
prog.cpp:20:13: error: missing template arguments before ‘)’ token
cintype(b,a);
^
prog.cpp:21:2: error: reference to ‘plus’ is ambiguous
plus(a,b)
^~~~
prog.cpp:8:6: note: candidates are: void plus(int, int)
void plus(const T num1,const T num2){
^~~~
In file included from /usr/include/c++/6/string:48:0,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from prog.cpp:1:
/usr/include/c++/6/bits/stl_function.h:147:12: note: template<class _Tp> struct std::plus
struct plus;
^~~~
prog.cpp:21:8: error: missing template arguments before ‘,’ token
plus(a,b)
^