#include%26lt;iostream.h%26gt;
#include%26lt;conio.h%26gt;
#include%26lt;stdio.h%26gt;
#include%26lt;string.h%26gt;
#include%26lt;dos.h%26gt;
main()
{
clrscr();
int i;
for(i=0;i%26lt;=256;i++)
putch(i);
getch();
struct REGPACK reg; %26lt;%26lt; Error is here!
reg.r_ax=0x1100;
reg.r_bx=0x1000;
reg.r_cx=256;
reg.r_dx=0;
reg.r_es=FP_SEG(font);
reg.r_bp=FP_OFF(font);
intr(0x10,®);
for(i=0;i%26lt;=256;i++)
putch(i);
getch();
return 0;
}
How to correct " Undefined structure 'REGPACK' Error " in a C++ application ?
hello,
it will indeed generate an error because the structure REGPACK is unknown.
To use structures, the structures have to be defined first. For example :
struct product {
int code;
int quantity
} pc, tv, radio;
pc.code = 12345;
pc.quantity = 32
tv.code = 23;
tv.quantity =10;
In the above example, the members of your struct had been defined before they were used. In the same sense, in the code that you have, REGPACK is undefined.
And since I dont know the specifics of your code, or what it does, only you can decipher what it can do.
I hope this helps.
PS : some structures are defined in header files. (files with .h as extension) it might be that you only missed "include"-ing one of the header files which defines REGPACK.
Cheers.=)
additional data :
I checked on some sites. it seems that this is related to video in and out, some kind of graphics programming. Try adding :
"#include %26lt;bios.h%26gt;"
it just might work :)
survey monkey
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment