C++ Error

09/03/2012 17:41 DerB0ss#1
Hey, ich fange grad an mit C++

Und bitte mal um Error hilfe,

error C2065: 'cout': nichtdeklarierter Bezeichner
error C2065: 'endl': nichtdeklarierter Bezeichner
error C3861: "system": Bezeichner wurde nicht gefunden.

danke im vorraus c;
09/03/2012 17:42 Havelock_Vetinari#2
der ganze Code wäre evtl. hilfreich ;)
09/03/2012 17:43 DerB0ss#3
Quote:
Originally Posted by Alex_II View Post
der ganze Code wäre evtl. hilfreich ;)
mkay,

Code:
#include "iostream"
#include "cmath"
#include "stdAfx.h"

using namespace std;

int main()
{
     int x = 0;

	 while( x <= 2000)
	 {
		 cout << x << endl;
		 x = x + 1;             //x++;
	 }

	system("PAUSE");
	return 0;
}
09/03/2012 17:49 Havelock_Vetinari#4
In VisualC++ muss man die includes wohl in stdafx.h ablegen... zumindest funktioniert das programm dann
09/03/2012 18:18 Rainvair#5
Code:
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
     int x = 0;

	 while( x <= 2000)
	 {
		 cout << x << endl;
		 x = x + 1;             //x++;
	 }

	return 0;
}

So geht es und system("PAUSE"); ist böse.
09/03/2012 18:23 DerB0ss#6
Okay, allerdings hab ich jetzt das problem
C++ sagt mir, das cout & endl, nicht deklariert sei,

was kann ich tuhen :c
09/03/2012 18:24 Havelock_Vetinari#7
entweder fehlt das namespace oder der iostream include....
09/03/2012 18:26 DerB0ss#8
Quote:
Originally Posted by Alex_II View Post
entweder fehlt das namespace oder der iostream include....
Code:
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
     int x = 0;

	 while( x <= 2000)
	 {
		 cout << x << endl;
		 x = x + 1;             //x++;
	 }

	return 0;
}
Da ist aber Namespace, sowie Das iostream include drin c;
09/03/2012 18:34 Havelock_Vetinari#9
ich weiß nicht wo dein problem liegt ^^ . Gerademit Dev C++ getestet : läuft wunderbar .... benutzt du denn C++ oder Visual C ++?
09/03/2012 18:37 DerB0ss#10
Visual C++.

// Soll ich auf das normale C++ umsteigen c; ?
09/03/2012 19:09 Havelock_Vetinari#11
Quote:
Originally Posted by DerB0ss View Post
Visual C++.

// Soll ich auf das normale C++ umsteigen c; ?
Das ist mir eig. egal :D musst du entscheiden ....

Hab doch vorhin schon gesagt wies mit visual c++ geht.... zumindest bei mir...
09/03/2012 19:23 DerB0ss#12
Quote:
Originally Posted by Alex_II View Post
Das ist mir eig. egal :D musst du entscheiden ....

Hab doch vorhin schon gesagt wies mit visual c++ geht.... zumindest bei mir...
mkay :D
09/03/2012 19:41 Havelock_Vetinari#13
Quote:
Originally Posted by DerB0ss View Post
mkay :D
Hinbekommen? oder brauchste noch weitere hilfe?...
09/03/2012 19:47 DerB0ss#14
Quote:
Originally Posted by Alex_II View Post
Hinbekommen? oder brauchste noch weitere hilfe?...
Ich feier grad voll habs grad hinbekommen,

hatte ein ' . ' Fehler ~

fail! :D

---------

Darf ich mal fragen,

Was ist der Unterschied zwischen C++ Visual C++ & Dev C++ ?
09/03/2012 19:55 Havelock_Vetinari#15
Quote:
Originally Posted by DerB0ss View Post
Ich feier grad voll habs grad hinbekommen,

hatte ein ' . ' Fehler ~

fail! :D

---------

Darf ich mal fragen,

Was ist der Unterschied zwischen C++ Visual C++ & Dev C++ ?
Hab michwohl vorhinfalsch ausgedrückt:D Dev C++ ist keine Sprache sondern eine Entwicklungsumgebung für C++ . Visual C++ ist von Microsoft, liefertgleich eine sehr gute IDE mit . C++ ist halt der Standart