I am getting this error, error C2666 where it states that 2 overloads have similar conversions. I am not quite sure how to resolve this error, I have looked all over the internet. This is the code I am trying to build.
Here is a copy of the error:
Error 1 error C2666: 'std::fpos<_Statetype>::operator !=' : 2 overloads have similar conversions c:\users\larry\documents\visual studio 2012\projects\test\test\main.cpp 15 1 test
Welcome to the forum. Please use the code tag to format your code.
I compiled it under GCC, and it complained about your use of exit(). You need to include stdlib.h as you don't define it. That aside, it was fine.
I compiled it under Visual Studio and I got your error. You only looked at part of the error. You really ought to read the whole thing.
It says:
x.cc(17) : error C2666: 'std::fpos<_Statetype>::operator !=' : 2 overloads have similar conversions
with
[
_Statetype=_Mbstatet
]
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(107): could be 'bool std::fpos<_Statetype>::operator !=(const std::fpos<_Statetype> &) const'
with
[
_Statetype=_Mbstatet
]
or 'built-in C++ operator!=(std::streamoff, int)'
while trying to match the argument list '(std::fpos<_Statetype>, const int)'
with
[
_Statetype=_Mbstatet
]
And that means it doesn't know what to do with 2*rowNum*colNum. For some reason it cannot compare a streampos with an int as there's more than one way to do it. That's really annoying, I'm not sure it's right.