iostream
Hola, alguien sabe porque me marca errores al querer compilar un programa en c++, en el que agrego la libreria <iostream.h>, para utilizar cin y cout,
lo estoy haciendo con gcc o g++ en Linux?
Espero que alguien me pueda ayudar. GRACIAS.
lo estoy haciendo con gcc o g++ en Linux?
Espero que alguien me pueda ayudar. GRACIAS.
Hola Rocio,
¿qué mensaje de error recibes?
¿dónde?
Cuando comentas alguna línea para acotar el error, ¿qué pasa?
¿que has hecho para intentar encontrar la respuesta por ti misma?
Bueno, si consiguieras decir de qué se trata, quizás pueda ayudar.
Saludos,
Alejandro
¿qué mensaje de error recibes?
¿dónde?
Cuando comentas alguna línea para acotar el error, ¿qué pasa?
¿que has hecho para intentar encontrar la respuesta por ti misma?
Bueno, si consiguieras decir de qué se trata, quizás pueda ayudar.
Saludos,
Alejandro
Efectivamente, deberías comentar un poco más cual es el error.
Para compilar con iostream y usar cin y cout debes usar el compilador g++
Se buena.
Para compilar con iostream y usar cin y cout debes usar el compilador g++
Se buena.
Hola a mi me pasa lo mismo me indica el programa que la libreria esta obsoleta, aqui le incluyo el error
#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 <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
mas detalles del error: #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 <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
Mi codigo
//exr2.cpp
#include<iostream.h>
void main()
{
int y,x;
x=5;
y=8;
cout << "X equals" <<" " << x << endl;
cout << endl;
cout << x <<" " <<" " << y << endl;
cout << y <<" " << "equals Y" << endl;
}
Estoy utilizando el compilador Dev C++ 4.9.9.2
Lo raro es que compilo el mismo programa con el Borland C++ 5.5 y no me da ningun error, me ejecuta el programa pero los resultados en la pantalla no son los correctos, si alguien me pude ayudar se lo agradecere-
#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 <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
mas detalles del error: #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 <iostream> instead of the deprecated header
<iostream.h>. To disable this warning use -Wno-deprecated.
Mi codigo
//exr2.cpp
#include<iostream.h>
void main()
{
int y,x;
x=5;
y=8;
cout << "X equals" <<" " << x << endl;
cout << endl;
cout << x <<" " <<" " << y << endl;
cout << y <<" " << "equals Y" << endl;
}
Estoy utilizando el compilador Dev C++ 4.9.9.2
Lo raro es que compilo el mismo programa con el Borland C++ 5.5 y no me da ningun error, me ejecuta el programa pero los resultados en la pantalla no son los correctos, si alguien me pude ayudar se lo agradecere-
