I have a problem with some code. This code ran fine in a separate program that I had created with the .c extension. When I copied the code from that file, and pasted into the much larger program that I am modifying and that has a .cpp extension, I got the following error message:
"cannot convert void(far interrupt *)(...) to void(far interrupt *)()"
I went back to the original file and it compiles fine. I changed the name of the file from opto22.c to opto22.cpp and it generates the error above. Compiler is 16 bit Borland.
Here is the function stripped of the parts not pertaining to this question:
unsigned uApiInt; // defined globally
int check_for_opto( char *arg )
void (far __interrupt *lpIntApiV)();
char far *pId;
for (uApiInt = 0x20; uApiInt < 0x100; ++uApiInt)
// this is the line that triggers the error
lpIntApiV = _dos_getvect(uApiInt);