Question
Please help me understand the problem with my code. I will add the else statements later. Here is the long list of my errors: soccer.cpp:
Please help me understand the problem with my code. I will add the else statements later. Here is the long list of my errors:
soccer.cpp: In function 'int main()':
soccer.cpp:22:6: error: no match for 'operator' (operand types are 'std::istream' {aka 'std::basic_istream
cin;
~~~^~~~
In file included from /usr/include/c++/8/string:52,
from /usr/include/c++/8/bits/locale_classes.h:40,
from /usr/include/c++/8/bits/ios_base.h:41,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/bits/basic_string.h:6314:5: note: candidate: 'template
operator& __os,
^~~~~~~~
/usr/include/c++/8/bits/basic_string.h:6314:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/bits/ios_base.h:46,
from /usr/include/c++/8/ios:42,
from /usr/include/c++/8/ostream:38,
from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/system_error:217:5: note: candidate: 'template
operator& __os, const error_code& __e)
^~~~~~~~
/usr/include/c++/8/system_error:217:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:497:5: note: candidate: 'template
operator& __out, _CharT __c)
^~~~~~~~
/usr/include/c++/8/ostream:497:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:502:5: note: candidate: 'template
operator& __out, char __c)
^~~~~~~~
/usr/include/c++/8/ostream:502:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:508:5: note: candidate: 'template
operator& __out, char __c)
^~~~~~~~
/usr/include/c++/8/ostream:508:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:514:5: note: candidate: 'template
operator& __out, signed char __c)
^~~~~~~~
/usr/include/c++/8/ostream:514:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:519:5: note: candidate: 'template
operator& __out, unsigned char __c)
^~~~~~~~
/usr/include/c++/8/ostream:519:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:539:5: note: candidate: 'template
operator& __out, const _CharT* __s)
^~~~~~~~
/usr/include/c++/8/ostream:539:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/ostream:693,
from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/bits/ostream.tcc:321:5: note: candidate: 'template
operator& __out, const char* __s)
^~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:556:5: note: candidate: 'template
operator& __out, const char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:556:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:569:5: note: candidate: 'template
operator& __out, const signed char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:569:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:574:5: note: candidate: 'template
operator& __out, const unsigned char* __s)
^~~~~~~~
/usr/include/c++/8/ostream:574:5: note: template argument deduction/substitution failed:
soccer.cpp:22:9: note: 'std::istream' {aka 'std::basic_istream
cinx;
^
In file included from /usr/include/c++/8/iostream:39,
from soccer.cpp:4:
/usr/include/c++/8/ostream:682:5: note: candidate: 'template
operator
^~~~~~~~
/usr/include/c++/8/ostream:682:5: note: template argument deduction/substitution failed:
/usr/include/c++/8/ostream: In substitution of 'template
soccer.cpp:22:9: required from here
/usr/include/c++/8/ostream:682:5: error: no type named 'type' in 'struct std::enable_if
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started