PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Kompiler funzt net



xearo110
08.08.2008, 15:05
Hi all, ich benutze den Kompiler Dev-C++ und das geht i-wie nicht^^...

Und zwar habe ich den ersten Text genommen:

#include <iostream.h>

int main ()
{
cout << "Hello World!\n";
return 0;
}

Und auf "Neu" bei Objekt, un dann müsste ich doch eig. auf Kompilieren + Ausführen oder??? Aber dann passiert nix... :(...

1 C:\Dev-Cpp\include\c++\3.3.1\backward\iostream.h:31, from C:\Dev-Cpp\fccc.cpp In file included from C:/Dev-Cpp/include/c++/3.3.1/backward/iostream.h:31, from C:/Dev-Cpp/fccc.cpp


1 C:\Dev-Cpp\fccc.cpp from C:/Dev-Cpp/fccc.cpp

2 C:\Dev-Cpp\include\c++\3.3.1\backward\backward_warning.h: 32 #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.

das zeigt er mir an... kann mir jemand helfen????

Mfg

]=-antr4xx-=[
08.08.2008, 15:06
du musst using std; davor setzen, oder std::cout anstelle von cout...

xearo110
08.08.2008, 15:10
Dann kommt aba noch mehr^^ dann kommen unten da 5 schritte:

1 C:\Dev-Cpp\fccc.cpp from C:/Dev-Cpp/fccc.cpp
2 C:\Dev-Cpp\include\c++\3.3.1\backward\backward_warning.h: 32 #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
C:\Dev-Cpp\fccc.cpp In function `int main()':
5 C:\Dev-Cpp\fccc.cpp syntax error before `;' token

komisch...

zao
08.08.2008, 15:11
du musst using std; davor setzen, oder std::cout anstelle von cout...

Nicht ganz:


using namespace std;

Added after 2 minutes:

Um die Warnung zu beseitigen, einfach das .h bei iostream weg lassen, das is veraltet.

Grüße

xearo110
08.08.2008, 15:17
C:\Dev-Cpp\fccc.cpp In function `int main()':
5 C:\Dev-Cpp\fccc.cpp syntax error before `<<' token

immernoch -.- ich glaube, verstehen muss ich des net oder?^^

Mfg

zao
08.08.2008, 15:18
ich schaus mir gern mal so an, adde mich einfach mal in icq 208722

Gumball
08.08.2008, 15:18
Das hatte ich am Anfang auch beim Dev-C++ ,nimm Code::Block,der ist wirklich besser (meiner Meinung nach)

zao
08.08.2008, 15:26
:lol:
Der Fehler hat aber nichts mit DEV zutun

Gumball
08.08.2008, 15:28
Sicher?Exakt dieser Code hat bei Dev nicht gefunzt,aber bei C::B schon....komisch oder ? -.-"

zao
08.08.2008, 15:32
hier wars eindeutig das hier:


#include <iostream>

int main ()
{
using namespace std; << "Hello World!\n";
return 0;
}


Grüße

Gumball
08.08.2008, 15:33
Nein


#include <iostream.h>

int main ()

{
cout << "Hello World!\n";
return 0;

}

zao
08.08.2008, 15:37
das einzigste was da nicht 100% in Ordnung ist ist wie gesagt


#include <iostream.h>

das ist veraltet, deshalb wirft Dev ne Warnung. Ansonsten stimmt aber alles an deinem Source und der sollte laufen.

richtig, bzw nicht veraltet wäre


#include <iostream>

Grüße

hateme666
08.08.2008, 18:01
ganz genau richtig ist es so :

#include <iostream>
using namespace std;

int main (){

cout << "Hello World!\n";

return 0;
}


oder so:


#include <iostream>

int main (){

std::cout << "Hello World!\n";

return 0;
}