Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C++ complains

Name: Anonymous 2012-01-13 10:16

I got it the longest C++ complain

GameEngine.cpp:253: error: no match for ‘operator<<’ in ‘std::operator<< [with _Traits = std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> >&)((std::basic_ostream<char, std::char_traits<char> >*)std::operator<< [with _Traits = std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> >&)((std::basic_ostream<char, std::char_traits<char> >*)std::operator<< [with _Traits = std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> >&)(& std::cerr)), ((const char*)"DEBUG ")))), ((const char*)"checkBoard.printcBoard()")))), ((const char*)": ")) << ((GEngine*)this)->GEngine::checkBoard. ChessMoves::printcBoard()’
/usr/include/c++/4.2.1/ostream:112: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:121: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:131: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:169: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:173: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:177: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/bits/ostream.tcc:92: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:184: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/bits/ostream.tcc:106: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:195: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:204: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:208: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:213: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:217: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:225: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/ostream:229: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/c++/4.2.1/bits/ostream.tcc:120: note:                 std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]

Name: Anonymous 2012-01-13 10:20

>>1
You are incompetent piece of shit. Go back to Visual Basic.

Name: Anonymous 2012-01-13 10:42

Install clang. Much better error output.

Name: Anonymous 2012-01-13 10:58

You think this is long, or even close to the longest?
You haven't been using g++ for long have you?

Name: Anonymous 2012-01-13 11:45

That was Enterprise Quality.

Name: Anonymous 2012-01-13 17:15

$ perl gSTLFilt.pl < errors.txt
BD Software STL Message Decryptor v3.10 for gcc 2/3/4
GameEngine.cpp:253: error: no match for ‘operator<<’ in ‘std::operator<<(
        (
            (ostream &)(
                (ostream *)operator<<(
                    (
                        (ostream &)(
                            (ostream *)operator<<(
                                ((ostream &)(& cerr)), ((const char *)"DEBUG
                                    ")))), (
                        (const char *)"checkBoard.printcBoard()")))), (
            (const char *)": ")) << ((GEngine *)this)->GEngine::checkBoard.
    ChessMoves::printcBoard()’
ostream:112: candidates are: ostream & ostream::operator<<(
        ostream & (*)(ostream &))
ostream:121: ostream & ostream::operator<<(
        basic_ios<char, char_traits<char> > & (*)(
            basic_ios<char, char_traits<char> > &))
ostream:131: ostream & ostream::operator<<(ios_base & (*)(ios_base &))
ostream:169: ostream & ostream::operator<<(long int)
ostream:173: ostream & ostream::operator<<(long unsigned int)
ostream:177: ostream & ostream::operator<<(bool)
ostream.tcc:92: ostream & ostream::operator<<(short int)
ostream:184: ostream & ostream::operator<<(short unsigned int)
ostream.tcc:106: ostream & ostream::operator<<(int)
ostream:195: ostream & ostream::operator<<(unsigned int)
ostream:204: ostream & ostream::operator<<(long long int)
ostream:208: ostream & ostream::operator<<(long long unsigned int)
ostream:213: ostream & ostream::operator<<(double)
ostream:217: ostream & ostream::operator<<(float)
ostream:225: ostream & ostream::operator<<(long double)
ostream:229: ostream & ostream::operator<<(const void *)
ostream.tcc:120: ostream & ostream::operator<<(
        basic_streambuf<char, char_traits<char> > *)



This obviously looks suspicious.

((GEngine *)this)->GEngine::checkBoard.ChessMoves::printcBoard()

Name: Anonymous 2012-01-13 17:32

Err...you where able to actually reassmble part of the OPs code with that tool?!

Name: Anonymous 2012-01-13 18:20

>>7
Those parts that he ``reassembled'' were already in >>1's error message. Read the first line.

Name: Anonymous 2012-01-13 18:23

yesh. just a little bit. i would guess that printcBoard returns void or something.

Name: Anonymous 2012-01-13 18:33

>using ostream

found your problem.

Name: Anonymous 2012-01-13 18:41

While we're at it, basic C++ question.

What does this declare:

Aa<Bb>::operator()(int)

Reading somebody else's code. I haven't really touched sepples in ages. What the fuck is operator parentheses?

And what about operator "delete" (as in, the string)? That shit doesn't even make sense.

Name: Anonymous 2012-01-13 18:44

What was your code, OP?

Name: Anonymous 2012-01-13 18:49

>>11
I've never programmed beyond hello world in C++ but my guess is that it represents a callable object that you can use like my_instance(420) on.

Name: Anonymous 2012-01-13 18:54

>>11
What the fuck is operator parentheses?
Lisp operator.

Name: Anonymous 2012-01-13 18:54

>>11
It declares the function call operator of the object (AKA functor object), which is somewhat like a function pointer or lambda function. C++11 lambdas/closures are (according to the Standard) implemented in this manner.

Name: Anonymous 2012-01-13 19:13

>>15`
>C++
>standard
>MMXII ANNO DOMINI

I seriously hope you guys don't actually come from the textboards.

Name: Anonymous 2012-01-13 20:29

>>16
Yeah, because you do.

Name: Anonymous 2012-01-13 21:11

>>16
[i]
Fuck off back to /g/
/[i], ``please"!

Don't change these.
Name: Email:
Entire Thread Thread List