31
« en: Jueves 10 de Febrero de 2005, 01:37 »
NECESITO AYUDA CON ESTE CODIGO, AL COMPILARLO, ME MANDA 2 MENSAJES DE ERROR:
84: STATEMENT MISSING
85: UNDEFINED SIMBOL objabs
AHORA AHI LES VA EL CODIGO:
#include<conio.h>
#include <iostream.h>
#include <math.h>
#include <graphics.h>
#include <dos.h>
#include <stdlib.h>
#include <stdio.h>
class abs
{
private:
float carga1,carga2,carga3,K;
unsigned int grado12,grado23,grado13;
float Fe12,Fe23,Fe13,Dist12,Dist13,Dist23;
public:
void dibujar();
void borrar();
void calcular();
abs();
~abs();
};
void dibujar()
{
setcolor(2);
circle(150,300,30);
}
abs::abs()
{
carga1=4e-6;
carga2=2e-6;
carga3=3e-6;
grado12=60;
grado13=60;
grado23=0;
K=9e9;
Dist12=0.2;
Dist13=0.2;
Dist23=0.2;
}
void abs::calcular()
{
Fe12=K*((carga1*carga2)/(pow(Dist12,2)));
Fe13=K*((carga1*carga3)/(pow(Dist13,2)));
Fe23=K*((carga2*carga3)/(pow(Dist13,2)));
}
void inicializar()
{
int gdriver = DETECT, gmode, errorcode;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "A:\BGI");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* return with error code */
}
}
abs::~abs()
{
}
main()
{
abs objabs; //LINEA 84
objabs.dibujar(); //LINEA 85
clrscr();
inicializar();
closegraph();
return 0;
}
LA VERDAD NO SE QUE ES LO QUE ESTA MASL Y NO SE COMO SOLUCIONARLO, ESPERO QUE ME PUEDAN AYUDAR.