unbekannte Fehlermeldung



  • Hallo

    Ich bescäftige mich jetzt schon eine Weil mit dem Buch "Spielend C++ lernen" und wollte gerade ein Spiel namens "Zwölferspiel" programmieren, beim debuggen kam dann aber folgende Fehlermeldung

    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>..\..\Module\Module\zeichenfunktionen.cpp(124): error C2676: Binärer Operator '<<': 'std::istream' definiert diesen Operator oder eine Konvertierung in einen für den vordefinierten Operator geeigneten Typ nicht
    1>  Zwölferspiel.cpp
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const std::error_code &)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1085): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &&,_Ty)": template-Argument für "std::basic_ostream<_Elem,_Traits> &&" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(968): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,unsigned char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(958): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const unsigned char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(951): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,signed char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(944): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const signed char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(937): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,_Elem)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(898): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const _Elem *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(851): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,char)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(811): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<char,_Traits> &std::operator <<(std::basic_ostream<char,_Traits> &,const char *)": template-Argument für "std::basic_ostream<char,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(764): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,char)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(726): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2784: "std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const char *)": template-Argument für "std::basic_ostream<_Elem,_Traits> &" konnte nicht von "std::istream" hergeleitet werden.
    1>          c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(679): Siehe Deklaration von 'std::operator <<'
    1>Zwölferspiel.cpp(10): error C2676: Binärer Operator '<<': 'std::istream' definiert diesen Operator oder eine Konvertierung in einen für den vordefinierten Operator geeigneten Typ nicht
    1>  Code wird generiert...
    ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========
    

    mit der ich ehrlich gesagt nichts anfangen kann

    Hier übrigens der Quelltext:

    #include <iostream>
    using namespace std;
    #include "zeichenfunktionen.h"
    int Mensch(int steine)
     {
    	 int anz;
    	 do
    	 {
    	   cout <<"Wie viele Steine möchtest du setzen???";
    	   cin<<anz;
    	 }while(!(anz==1||(anz==2&&steine<11)));
    	 return(anz);
     }
    
     int Computer(int steine)
     {
    	 if(steine==11)
    	 {
    		 return 1;
    	 }
    	 if(steine==10)
    	 {
    		 return 2;
    	 }
    	 return Mathemahotep::ErmittleZufallszahl(1,2);
     }
    int main()
    {
      Zeichenbrett::Oeffnen(700,200);
      Mathemahotep::HilfMir();
      bool computer=false;
      int steine=0;
      do
      {
    	  ZeichneSpielfeld(steine);
    	  Zeichenbrett::FensterNachVorne();
    	  if(computer==true)
    	  {
    		  int anz=Computer(steine);
    		  cout<<"Der Computer spielt ";
    		  cout <<anz<<" Stein(e)"<<endl;
    		  steine=steine+anz;
    	  }
    	  else
    	  {
    		  steine=steine+Mensch(steine);
    			  }
    			  if(steine<12)
    			  {
    				  computer=!computer;
    			  }
      }while(steine<12);
    
      ZeichneSpielfeld(steine);
    
      if(computer==true)
      {
    	  cout<<"Leider verloren"<<endl;
    	  Zeichenbrett::ZeichneText(225,140,"Gewinner:Computer",20);
      }
      else
      {
    	  cout<<"Du hast gewonnen!"<<endl;
    	  Zeichenbrett::ZeichneText(225,140,"Gewinner:DU!",20);
    	  Zeichenbrett::FensterNachVorne();
      }  
      cin.get();
    }
    

    (die Funktionen Computer und Mensch musste ich in den Quelltext von main schreiben, weil beim Auslagern die Fehlermeldung "nicht definierter Operator" kam)

    Ich hoffe ihr könnt mir helfen und bedanke mich schon mal in Voraus,
    mlg
    Daniel



  • zeile 10, die << sind falsch

    das müsste cin >> anz; heissen...



  • Hallo Daniel,

    anstatt uns die komplette Fehlerliste zu posten, wäre es viel interessanter, welche Zeile denn nun bei dir 124 ist?
    Aber die Antwort von Skym0sh0 sollte den Fehler beheben (ich hoffe, du verstehst nun auch die Fehlermeldung - es gibt für std::istream keinen überladenen << Operator).

    Und "using namespace std;" solltest du niemals vor den '#include'-Anweisungen schreiben (auch wenn du dann evtl. in den Header-Dateien den Namensbereich explizit mit "std::" aufführen mußt).
    Aber anscheinend ist deine Headerdatei aber leer, denn hättest du dort die Deklaration deiner beiden Funktionen "Mensch" und "Computer" drin, so käme es auf die Reihenfolge in der CPP-Datei nicht mehr an).



  • Vielen Dank für die schnelle Antwort, funktioniert aber noch immer nicht (Fehlermeldungen kommen trotzdem) 😞



  • So, jetzt gehts 😃
    hab mir jz mal die Zeile 124 angesehen, dort war noch ein cin<< 😉
    Vielen Dank für eure Hilfe



  • also die fehlermeldung die uns hier reinkopiert hast sollte dann weggehen.

    merke:

    cout << "test" << 6 << " weiter test" << 5.024348 << endl;
    cin >> var1 >> var2 >> var3;
    

    cout mit '<<' und cin mit '>>'
    dann kommen solche fehlermeldungen nicht. und das muss natürlich im gesamten programm gegeben sein.

    und vielleicht solltest du mal alles neu kompilieren/neu erstellen



  • danke, ja hab ich gemacht



  • hätte aber noch eine Frage: warum kommt genau bei allen int-Funktionen, die ich nach "zeichenfunktionen.cpp" auslagere, die Fehlermeldung "Bezeichner wurde nicht gefunden"???



  • das cin und cout und so wird in der iostream(header datei) definiert. und erst in den dateien (sei es *.h oder *.cpp) wo du eben diese iostream inkludierst, sind die bezeichner(bezeichner bedeutet namen von variablen, funktionen, etc.) bekannt. das heisst, du kannst in deine main.cpp iostream 5mal inkludieren. sie wird dennoch solange in zeichenfunktion.h (und auch .cpp) unbekannt bleiben, bis du sie auch dort inkludierst.

    wobei wenn du xXx.h in die A.h inkludierst, und diese A.h in deine A.cpp, dann ist xXx.h auch in A.cpp bekannt.
    für dein beispiel heisht das, include iostream in die zeichenfunktion.h und damit sollte sie in zeichenfunktion.cpp und in main.cpp bekannt sein

    normaler weise inkludiert man dateien in headerdateien, diese inkludiest du in die zugehörige cpp datei. aber es gibt ausnahmen z.B. bei zyklischen abhängigkeiten, aber das ist ein fall für später, wenn du mal drüber stolperst

    EDIT:jahh !! 1337 !


  • Mod

    Skym0sh0 schrieb:

    EDIT:jahh !! 1337 !

    😕

    Skym0sh0
    Mitglied
    
    Benutzerprofil
    Anmeldungsdatum: 22.03.2008
    Beiträge: [b]1226[/b]
    

    Oder kapiere ich gerade nicht, was du meinst?



  • uhrzeit des beitrags :>

    bissgen kindergarten wird doch wohl erlaubt sein 😉

    - Ein Kluger Mann findet immer Zeit für Dummheiten.



  • also ich habe jetzt die Funktionen int Mensch, int Computer und int ComputerStark nach zeichenfunktionen.h und zeichenfunktionen.cpp ausgelagert und in zeichenfunktionen.h iostream includiert und es kommt trotzdem noch die Fehlermeldung "Bezeichner wurde nicht gefunden"...



  • hast du auch in zeichenfunktion.cpp die zeichenfunktion.h eingebunden, also dass der iostream header weitergeleitet wird?

    wie sieht das mit dem std namespace aus?
    hast du entweder irgendwo using namespace std; (nicht so gute lösung) stehen?
    oder (bessere möglichkeit) nutzt du cout und so in verbindung mit std? also std::cout << ...



  • ich habe using namespace std; aber was ist so falsch daran (steht so in meinem Buch...)

    EDIT: ich habs jz mal anders probiert, funktioniert aber trotzdem nicht...



  • danielgott schrieb:

    EDIT: ich habs jz mal anders probiert, funktioniert aber trotzdem nicht...

    Also

    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello Wasweißich!\n";
    }
    
    #include <iostream>
    
    int main()
    {
        std::cout << "Hello Wasweißich!\n";
    }
    

    Wo liegt das Problem? Ist im Endeffekt Stilfrage.



  • ja an sich ists egal, aber mit ungünstig gesetzten using direktiven hebelt man das komplette namespace system aus.



  • Skym0sh0 schrieb:

    ja an sich ists egal, aber mit ungünstig gesetzten using direktiven hebelt man das komplette namespace system aus.

    Es ging um die Fehlermeldung, ich mag dieses ausschütten genausowenig :xmas1:



  • ja und die ist noch immer da...



  • danielgott schrieb:

    ja und die ist noch immer da...

    Und lautet?
    Mein Gott, wie sollen wir dir ohne denn helfen?



  • danielgott schrieb:

    hätte aber noch eine Frage: warum kommt genau bei allen int-Funktionen, die ich nach "zeichenfunktionen.cpp" auslagere, die Fehlermeldung "Bezeichner wurde nicht gefunden"???


Anmelden zum Antworten