Record Detail

Compile Error

In file included from /in/sam.cpp:4:0:
/in/compile/Instr.h: In function 'std::istream& operator>>(std::istream&, Instr&)':
/in/compile/Instr.h:27:55: error: no matching function for call to 'find(const string [9], const string*, std::__cxx11::string&)'
     auto ptr = std::find(instrPrint, instrPrint + 9, s);
                                                       ^
In file included from /usr/include/c++/7/bits/locale_facets.h:48:0,
                 from /usr/include/c++/7/bits/basic_ios.h:37,
                 from /usr/include/c++/7/ios:44,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/sam.cpp:1:
/usr/include/c++/7/bits/streambuf_iterator.h:369:5: note: candidate: template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)
     find(istreambuf_iterator<_CharT> __first,
     ^~~~
/usr/include/c++/7/bits/streambuf_iterator.h:369:5: note:   template argument deduction/substitution failed:
In file included from /in/sam.cpp:4:0:
/in/compile/Instr.h:27:55: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'const string* {aka const std::__cxx11::basic_string<char>*}'
     auto ptr = std::find(instrPrint, instrPrint + 9, s);
                                                       ^
/in/compile/Makefile:16: recipe for target 'buildStackMachine' failed
make: *** [buildStackMachine] Error 1

Information

Submit By
Type
Submission
Homework
Project Five: List, Stack, and Queue
Language
C++
Submit At
2022-07-26 17:51:57
Judged At
2022-07-26 17:52:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes