problem mit xstring und utility



  • HALLO.

    ich habe eine frage zu folgendem kleinem programm:

    #include <EasyBMP.h>
    #include <fstream>
    #include <vector>
    #include <algorithm>
    #include <iostream>
    #include <cmath>
    #include "conio.h"
    #include <sstream>
    
    using namespace std;
    
    int main ()
    {
    
    	cout << "\n\nEND OF THE PROGRAM. PLEASE PRESS ANY KEY TO CONTINUE.";
    	_getch();
    	return 0;
    }
    

    leider spuckt der compiler folgende fehlermeldungen aus, und zwar bei allen programmen, die ich auf meinem rechner habe. woran kann das liegen?

    VIELEN DANK.
    STICK.

    Error	40	error C2144: syntax error : 'std::iterator' should be preceded by ';'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	28	error C2146: syntax error : missing ';' before identifier 'const_pointer'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	34	error C2146: syntax error : missing ';' before identifier 'const_reference'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	22	error C2146: syntax error : missing ';' before identifier 'difference_type'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	8	error C2146: syntax error : missing ';' before identifier 'distance_type'	c:\programme\microsoft visual studio\vc98\include\utility
    Error	15	error C2146: syntax error : missing ';' before identifier 'int_type'	c:\programme\microsoft visual studio\vc98\include\utility
    Error	2	error C2146: syntax error : missing ';' before identifier 'iterator_category'	c:\programme\microsoft visual studio\vc98\include\utility
    Error	25	error C2146: syntax error : missing ';' before identifier 'pointer'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	31	error C2146: syntax error : missing ';' before identifier 'reference'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	19	error C2146: syntax error : missing ';' before identifier 'size_type'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	5	error C2146: syntax error : missing ';' before identifier 'value_type'	c:\programme\microsoft visual studio\vc98\include\utility
    Error	37	error C2146: syntax error : missing ';' before identifier 'value_type'	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	41	error C2208: 'std::iterator' : no members defined using this type	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	12	error C2923: 'std::iterator' : '_Tr::off_type' is not a valid template type argument for parameter '_D'	c:\programme\microsoft visual studio\vc98\include\utility
    Error	13	error C2955: 'std::iterator' : use of class template requires template argument list	c:\programme\microsoft visual studio\vc98\include\utility
    Error	3	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\utility
    Error	6	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\utility
    Error	9	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\utility
    Error	16	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\utility
    Error	20	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	23	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	26	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	29	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	32	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	35	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	38	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	c:\programme\microsoft visual studio\vc98\include\xstring
    Error	42	fatal error C1903: unable to recover from previous error(s); stopping compilation	c:\programme\microsoft visual studio\vc98\include\xstring
    


  • Zeig mal bitte den Inhalt von "conio.h" und <EasyBMP.h>, einer von denen (der, den du gemacht hast?!) ist mit großer Wahrscheinlichkeit kaputt.



  • Die Fehlermeldungen haben irgendwie nichts mit Deinem geposteten Code zu tun, oder?

    edit: *zu langsam*



  • HI.

    danke für die antwort. an CONIO.H oder EASYBMP.H kann es leider nicht liegen, denn bei folgendem code gibts immer noch die gleichen meldungen:

    #include <iostream>
    //#include <EasyBMP.h>
    //#include <fstream>
    //#include <vector>
    //#include <algorithm>
    //#include <cmath>
    //#include "conio.h"
    //#include <sstream>
    //using namespace std;
    
    int main ()
    {
    
    	cout << "\n\nEND OF THE PROGRAM. PLEASE PRESS ANY KEY TO CONTINUE.";
    //	_getch();
    	return 0;
    }
    

    DANKE.
    STICK.



  • Hmm, dann solltest du vielleicht das VS neu installieren. Die Header sind scheinbar kaputt. Hast du da irgendwie dran rumgemogelt?



  • Erstmal solltest du es trotzdem noch nach Standard programmieren, also nicht iostream.h und dann auch using namespace std rein. Ansonsten würde ich mal vermuten das die iostream xstring und utility einbindet und da irgendwas drin kaputt ist. Hast du irgendwo an den Headern rumgefummelt?



  • HI FILMOR.

    das habe ich mir auch fast gedacht, aber bewusst daran etwas verändert habe ich nicht. ich werde es aber mal mit einer neuinstallation probieren.

    STICK.



  • hmmm. sehr komisch. ich habe jetzt VC 2005 express neu installiert, doch es kommen immer noch die gleichen fehler. jetzt bin ich etwas sprachlos.

    was könnte jetzt noch falsch sein?

    STICK.



  • Du hast VC98 statt VC2005 als Includepfad?



  • hi FILMOR,

    irgendetwas mit VC++ 6.0 wars wohl gewesen. nach dessen deinstallation und wiederholter neuinstallation von VC++ 2005 express klappts jetzt auch wieder.

    DANKE.
    STICK.


Anmelden zum Antworten