Why won't it work?
errors:Code:#include <stdio.h> #include <stdlib.h> #include <dos.h> int myGetch(void) { union REGS regs; regs.x.ah = 16; int86(22, & regs, & regs); //ignore the spaces, this is to stop return regs.x.al; //it doing ® grr... } int main(int argc, char *argv[]) { int a = myGetch(); printf("%c",a); return 0; }
Code:aggregate `union REGS regs' has incomplete type and cannot be initialized