Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

unsure how to fix this. referenced from the codes above In file included from main.cpp: 2 4 : mystring.h: 4 : warning: ignoring #pragma warning

unsure how to fix this. referenced from the codes above In file included from main.cpp:24:
mystring.h:4: warning: ignoring #pragma warning [-Wunknown-pragmas]
4| #pragma warning(disable:4996)
|
main.cpp: In function void RelationTest():
main.cpp:126:53: error: no match for operator<(operand types are const char* and cs_mystring::MyString)
126| cout <<" Is left < right? "<< boolString(v < u)<< endl;
| ~ ^ ~
|||
|| cs_mystring::MyString
| const char*
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from mystring.h:6,
from main.cpp:24:
/usr/include/c++/9/bits/stl_pair.h:454:5: note: candidate: template constexpr bool std::operator<(const std::pair<_T1,_T2>&, const std::pair<_T1,_T2>&)
454| operator<(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
|^~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:454:5: note: template argument deduction/substitution failed:
main.cpp:126:55: note: mismatched types const std::pair<_T1,_T2> and const char*
126| cout <<" Is left < right? "<< boolString(v < u)<< endl;
|^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from mystring.h:6,
from main.cpp:24:
/usr/include/c++/9/bits/stl_iterator.h:331:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
331| operator<(const reverse_iterator<_Iterator>& __x,
|^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:331:5: note: template argument deduction/substitution failed:
main.cpp:126:55: note: mismatched types const std::reverse_iterator<_Iterator> and const char*
126| cout <<" Is left < right? "<< boolString(v < u)<< endl;
|^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from mystring.h:6,
from main.cpp:24:
/usr/include/c++/9/bits/stl_iterator.h:369:5: note: candidate: template bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
369| operator<(const reverse_iterator<_IteratorL>& __x,
|^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:369:5: note: template argument deduction/substitution failed:
main.cpp:126:55: note: mismatched types const std::reverse_iterator<_Iterator> and const char*
126| cout <<" Is left < right? "<< boolString(v < u)<< endl;
|^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from mystring.h:6,
from main.cpp:24:
/usr/include/c++/9/bits/stl_iterator.h:1160:5: note: candidate: template bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
1160| operator<(const move_iterator<_IteratorL>& __x,
|^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1160:5: note: template argument deduction/substitution failed:
main.cpp:126:55: note: mismatched types const std::move_iterator<_IteratorL> and const char*
126| cout <<" Is left < right? "<< boolString(v < u)<< endl;
|^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Describe the steps in determining inventory quantities.

Answered: 1 week ago

Question

Outline Aristotles positions on memory, sensing, and motivation.

Answered: 1 week ago