elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / Clase ejemplo en OpenGL freeglut en: 6 Abril 2024, 19:50 pm
//Hay un error y me dice que la función Escribir no pertenece
//a la clase Ayuda

class Ayuda
{
        private:
               int pos1;
               int pos2;
               char Texto(12);
         public:
                void Escribir(int, int, char);
                Ayuda(int, int, char);
};

Ayuda::Ayuda(int _pos1, int _pos2, char _Texto)
{
         pos1= _pos1;
         pos2= _pos2;
         Texto[12]=_Texto;
}

void Ayuda::Escribir(int _pos1, int _pos2, char _Texto)
{
         pos1= _pos1;
         pos2= _pos2;
         Texto[12]= _Texto;
}


Int main()
{
        Ayuda AyudaTexto();
        AyudaTexto.Escribir(20, 20, "ho");//en esta linea esta el error

         Return 0;
}
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines