the gmail on w2000 at the library is acting buggy, don't know if .txt 
attachment made it out.
The answer to your query is in the attachment. kurt<>.


re: "..what uninitialized pointers, etc..."'

   you might have misconstrued what I was refering to; I had come across the 

void mouse_status( int *x, int *y, int *b )
    union REGS inreg, outreg;;;

BX=number of the button pressed. 1-left 2-right 3-middle
CX=x co-ordinate
DX=y co-ordinate

I modified it slightly as:

void mouse_status( int *x, int *y, int *b )

    union REGS inreg, outreg;
B= *b=outreg.x.bx;
X= *;
Y= *y=outreg.x.dx;


You should note that all variables are declared globally by declaring them 
above 'int main()';

also note that the 'int *b' in the declaration of mouse_status and the int *b 
in the global
declarations do not have the same scope; mouse_status can only 'see' the int *b 
from it's local
declaration list and cannot see the global int *b above main. This was a 

 The point is that I decided to pass the results back to 'int main()' using 
global variables
instead of passing-by-reference; this made the arg-list in mouse_status 
irrelevant to int main(),
as far as passing anything, but still present and requiring three pointers to 
call it. I know,
it's messy and the void function could have been reworked with no arg-list, but 
I admitted to
being in a hurry.

using namespace std;
int dva=10;
int dvb=20;
int dvc=30;
int *a=&dva;
int *b=&dvb;
int *c=&dvc;
int X=78;double x=0.0;
int Y=78;double y=0.0;
int B=0;int M=0;int N=0;
int k=0;
int r=0;

int initmouse();
void showmouse();
void hidemouse();
void mouse_status(int *x,int *y,int *b);
void obj();
void changecursor(int *shape,int x,int y);
void dmy();
void shobx();

int main()

At any rate, the code between the rem-$ above was not included in the first 
rush-job and the
pointers were simply declared but uninitialized. They say a "wild pointer" 
might do just about
anything, and they are right; it busted the dosbox, and I had to do a repair 
reinstall from
the xp cd!. So what was absent was the fourth dummy,yours truly!.


Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.
Freedos-user mailing list

Reply via email to