Fehler iostream???

D

dfrie

Grünschnabel
Wer kann mir helfen?

Wiw wo kann es dran liegen?
Habe folgende Fehlermeldung:

g++ -Wall -Wreturn-type -Wreturn-type -D__STRICT_ANSI__ -D_ANSI_C_SOURCE -g -Wno-deprecated -I/qlib/include/qlib -I/include/algo -I/temp_generated -I/stl -include include/qlib/mem_debug.h -c /src/algo/jackson.cc -o /temp_generated/jackson.o
In file included from /usr/include/c++/3.2.2/bits/basic_ios.h:40,
from /usr/include/c++/3.2.2/ios:51,
from /usr/include/c++/3.2.2/ostream:45,
from /usr/include/c++/3.2.2/iostream:45,
from /usr/include/c++/3.2.2/backward/iostream.h:32,
from /qlib/include/qlib/algo.h:15,
from /include/algo/jackson.h:15,
from /src/algo/jackson.cc:14:
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:48: parse error before `<'
token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:54: syntax error before `;'
token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55: `_Traits' is not a class
or namespace
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55: `int_type' is not a class
or namespace
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55: using `typename' outside
of template
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55: `_Traits' fails to be a
typedef or built in type
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56: `_CharT' was not declared
in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56: `_Traits' was not declared
in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56: template argument 1 is
invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56: template argument 2 is
invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57: `_CharT' was not declared
in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57: `_Traits' was not declared
in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57: template argument 1 is
invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57: template argument 2 is
invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:59: parse error before `
private'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:70: parse error before `public
'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h: In function `int
std::istreambuf_iterator(istream_type&)':
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: `int
std::istreambuf_iterator(istream_type&)' redeclared as different kind of
symbol
/usr/include/c++/3.2.2/iosfwd:95: previous declaration of `template<class
_CharT, class _Traits = std::char_traits<_CharT> > class
std::istreambuf_iterator'
/usr/include/c++/3.2.2/iosfwd:95: previous non-function declaration `
template<class _CharT, class _Traits = std::char_traits<_CharT> > class
std::istreambuf_iterator'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: conflicts with function
declaration `int std::istreambuf_iterator(istream_type&)'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: request for member `rdbuf'
in `__s', which is of non-aggregate type `int'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: `traits_type' undeclared
(first use this function)
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: (Each undeclared
identifier is reported only once for each function it appears in.)
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: parse error before `::'
token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: only constructors take
base initializers
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75: confused by earlier errors, bailing out
make: *** [jackson.o] Fehler 1
 
abend,

die Ausgabe deines Compilers sagt mir jedenfalls das du dir dein C++- Code mal genauer anschauen solltest und die Felher beheben solltest. :)

Bist du auch Strikt nach ANSI- Regel vorgegangen?

Syntax fehler wie z.b.

/usr/include/c++/3.2.2/bits/streambuf_iterator.h:48: parse error before `<'
token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:54: syntax error before `;'
token

u.a.

behabt doch erstmal die FEhler und dann seh weiter... ;)

mfg
_FILE_
 
Hi@all

Kann es sein, dass du statt #include <iostream> #include <iostream.h> benutzt?

Cu
André
 
<iostream.h> ist nicht mehr akutell.
Benutze
Code:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;

Damit dürftest du alles haben.
wenn es mehr sein muss, dann mach es mit einem
Code:
#include <iostream>
using namespace std;
 
erstmal Danke für die ersten Ideen

in algo.h binde ich <iostrem> ein
und nun auch den Code
--------------------------------------------------------------------------------
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
--------------------------------------------------------------------------------

bringt leider keine Änderung.

Gibt es vielleicht bei anderen Klassen auch noch ältere bzw. neuere Versionen?

Gruß
David
 

Ähnliche Themen

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

X startet nichtmehr

g++ kompilieren schlägt fehl

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

Zurück
Oben