[comp.os.msdos.programmer] Turbo - C

darcy@druid.uucp (D'Arcy J.M. Cain) (03/25/91)

[comp.lang.c is the wrong newsgroup for this.  See followup-To]
In article <6204@baird.cs.strath.ac.uk> Scott M Glen CS89 writes:
>   getimage (0,0,20,20);

I assume you have a "#include <graphics.h>" line.  You should also turn on
every warning you can.  Your compiler would have told you that the above
function call was missing an argument, the buffer to hold the image data.

>   i=getch();               /* wait for a key */
Just a nit, you don't need the assignment to i since you obviously don't
plan to use the value returned by getch().

>   putimage (0,0,buffer,COPY_PUT);   /* restore rectangle 
I'm not sure why it hangs here instead of when you read the image but it
certainly won't restore the screen.  My guess is that you are writing to
memory that isn't required until this function returns, perhaps the
stack itself.


-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   There's no government
Toronto, Ontario, Canada           |   like no government!
+1 416 424 2871                    |