prog.cpp:31:30: error: declaration of ‘operator<<’ as non-function
friend bool operator << <>(uniVar &val, stek &ob);
^~
prog.cpp:31:30: error: expected ‘;’ at end of member declaration
prog.cpp:31:33: error: expected unqualified-id before ‘<’ token
friend bool operator << <>(uniVar &val, stek &ob);
^
prog.cpp:32:30: error: declaration of ‘operator>>’ as non-function
friend bool operator >> <>(uniVar &val, stek &ob);
^~
prog.cpp:32:30: error: expected ‘;’ at end of member declaration
prog.cpp:32:33: error: expected unqualified-id before ‘<’ token
friend bool operator >> <>(uniVar &val, stek &ob);
^
prog.cpp:39:36: error: ‘stek’ is not a type
bool operator >> (uniVar &val, stek &ob){
^~~~
prog.cpp: In function ‘bool operator>>(uniVar&, int&)’:
prog.cpp:40:19: error: request for member ‘pos’ in ‘ob’, which is of non-class type ‘int’
if(ob.pos+1 < STEK_SIZE){
^~~
prog.cpp:41:20: error: request for member ‘st’ in ‘ob’, which is of non-class type ‘int’
ob.st[++ob.pos] = val;
^~
prog.cpp:41:28: error: request for member ‘pos’ in ‘ob’, which is of non-class type ‘int’
ob.st[++ob.pos] = val;
^~~
prog.cpp: At global scope:
prog.cpp:49:36: error: ‘stek’ is not a type
bool operator << (uniVar &val, stek &ob){
^~~~
prog.cpp: In function ‘bool operator<<(uniVar&, int&)’:
prog.cpp:50:19: error: request for member ‘pos’ in ‘ob’, which is of non-class type ‘int’
if(ob.pos > -1){
^~~
prog.cpp:51:26: error: request for member ‘st’ in ‘ob’, which is of non-class type ‘int’
val = ob.st[ob.pos--];
^~
prog.cpp:51:32: error: request for member ‘pos’ in ‘ob’, which is of non-class type ‘int’
val = ob.st[ob.pos--];
^~~
prog.cpp: In function ‘int main()’:
prog.cpp:73:19: error: no match for ‘operator>>’ (operand types are ‘char’ and ‘stek<char>’)
buffer[1] >> Stek;
~~~~~~~~~~^~~~~~~
prog.cpp:39:10: note: candidate: template<class uniVar> bool operator>>(uniVar&, int&)
bool operator >> (uniVar &val, stek &ob){
^~~~~~~~
prog.cpp:39:10: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: cannot convert ‘Stek’ (type ‘stek<char>’) to type ‘int&’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:924:5: note: candidate: template<class _CharT, class _Traits, class _Tp> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&)
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^~~~~~~~
/usr/include/c++/6/istream:924:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:808:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)
operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
^~~~~~~~
/usr/include/c++/6/istream:808:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:803:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)
operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
^~~~~~~~
/usr/include/c++/6/istream:803:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:761:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)
operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
^~~~~~~~
/usr/include/c++/6/istream:761:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:756:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)
operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
^~~~~~~~
/usr/include/c++/6/istream:756:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/istream:934:0,
from /usr/include/c++/6/iostream:40,
from prog.cpp:1:
/usr/include/c++/6/bits/istream.tcc:923:5: note: candidate: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
^~~~~~~~
/usr/include/c++/6/bits/istream.tcc:923:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/istream:934:0,
from /usr/include/c++/6/iostream:40,
from prog.cpp:1:
/usr/include/c++/6/bits/istream.tcc:955:5: note: candidate: template<class _CharT2, class _Traits2> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
^~~~~~~~
/usr/include/c++/6/bits/istream.tcc:955:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
In file included from /usr/include/c++/6/string:53: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/basic_string.tcc:1437:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator>>(basic_istream<_CharT, _Traits>& __in,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.tcc:1437:5: note: template argument deduction/substitution failed:
prog.cpp:73:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[1] >> Stek;
^~~~
prog.cpp:74:19: error: no match for ‘operator>>’ (operand types are ‘char’ and ‘stek<char>’)
buffer[0] >> Stek;
~~~~~~~~~~^~~~~~~
prog.cpp:39:10: note: candidate: template<class uniVar> bool operator>>(uniVar&, int&)
bool operator >> (uniVar &val, stek &ob){
^~~~~~~~
prog.cpp:39:10: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: cannot convert ‘Stek’ (type ‘stek<char>’) to type ‘int&’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:924:5: note: candidate: template<class _CharT, class _Traits, class _Tp> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&)
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^~~~~~~~
/usr/include/c++/6/istream:924:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:808:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)
operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
^~~~~~~~
/usr/include/c++/6/istream:808:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:803:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)
operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
^~~~~~~~
/usr/include/c++/6/istream:803:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:761:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)
operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
^~~~~~~~
/usr/include/c++/6/istream:761:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/iostream:40:0,
from prog.cpp:1:
/usr/include/c++/6/istream:756:5: note: candidate: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)
operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
^~~~~~~~
/usr/include/c++/6/istream:756:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<char, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/istream:934:0,
from /usr/include/c++/6/iostream:40,
from prog.cpp:1:
/usr/include/c++/6/bits/istream.tcc:923:5: note: candidate: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
^~~~~~~~
/usr/include/c++/6/bits/istream.tcc:923:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/istream:934:0,
from /usr/include/c++/6/iostream:40,
from prog.cpp:1:
/usr/include/c++/6/bits/istream.tcc:955:5: note: candidate: template<class _CharT2, class _Traits2> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)
operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
^~~~~~~~
/usr/include/c++/6/bits/istream.tcc:955:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~
In file included from /usr/include/c++/6/string:53: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/basic_string.tcc:1437:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator>>(basic_istream<_CharT, _Traits>& __in,
^~~~~~~~
/usr/include/c++/6/bits/basic_string.tcc:1437:5: note: template argument deduction/substitution failed:
prog.cpp:74:22: note: mismatched types ‘std::basic_istream<_CharT, _Traits>’ and ‘char’
buffer[0] >> Stek;
^~~~