Porque no funciona el gotoxy, clrscr, etc en c++ 6
Publicado por Giancarlo (1 intervención) el 12/10/2010 16:13:04
Buen Dia, tengo un inconveniente pues el visual C++ 6.0 trabaja bien pero cuando creo programas pequeños como el del ejemplo de abajo me sale error al compilar talñ como tambien lo muestro mas abajo, nose que hacer pues las librerias que uso estan bien y todo esta correctamente hecho.
mi pc tiene el windows 7, nose si sera por eso.
------------------------------------------------------------
#include <iostream.h>
#include <conio.h>
int main()
{
cprintf( "Ejemplo de \"textbackground\" y \"textcolor\"\r\n\r\n" );
textbackground( BLUE );
textcolor( LIGHTRED );
cprintf( "Este mensaje tiene otro color de fondo y de texto.\r\n" );
textbackground( WHITE );
cprintf( "Este mensaje tiene un color de fondo distinto.\r\n" );
normvideo();
cprintf( "Pulsa una tecla para continuar...\r\n" );
getch();
return 0;
}
Errores que salen al compilar
-----------------------------------------------------------------------------------------
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
C:\Cpp1.cpp(7) : error C2065: 'textbackground' : undeclared identifier
C:\Cpp1.cpp(7) : error C2065: 'BLUE' : undeclared identifier
C:\Cpp1.cpp(8) : error C2065: 'textcolor' : undeclared identifier
C:\Cpp1.cpp(8) : error C2065: 'LIGHTRED' : undeclared identifier
C:\Cpp1.cpp(10) : error C2065: 'WHITE' : undeclared identifier
C:\Cpp1.cpp(12) : error C2065: 'normvideo' : undeclared identifier
Error executing cl.exe.
Cpp1.obj - 6 error(s), 0 warning(s)
mi pc tiene el windows 7, nose si sera por eso.
------------------------------------------------------------
#include <iostream.h>
#include <conio.h>
int main()
{
cprintf( "Ejemplo de \"textbackground\" y \"textcolor\"\r\n\r\n" );
textbackground( BLUE );
textcolor( LIGHTRED );
cprintf( "Este mensaje tiene otro color de fondo y de texto.\r\n" );
textbackground( WHITE );
cprintf( "Este mensaje tiene un color de fondo distinto.\r\n" );
normvideo();
cprintf( "Pulsa una tecla para continuar...\r\n" );
getch();
return 0;
}
Errores que salen al compilar
-----------------------------------------------------------------------------------------
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
C:\Cpp1.cpp(7) : error C2065: 'textbackground' : undeclared identifier
C:\Cpp1.cpp(7) : error C2065: 'BLUE' : undeclared identifier
C:\Cpp1.cpp(8) : error C2065: 'textcolor' : undeclared identifier
C:\Cpp1.cpp(8) : error C2065: 'LIGHTRED' : undeclared identifier
C:\Cpp1.cpp(10) : error C2065: 'WHITE' : undeclared identifier
C:\Cpp1.cpp(12) : error C2065: 'normvideo' : undeclared identifier
Error executing cl.exe.
Cpp1.obj - 6 error(s), 0 warning(s)
Valora esta pregunta


0