Get Video Pointer.... DirectX Example
I have problem with the "Windows Game Programming for Dummies" code. I use Borland C++ Builder 4. There''s this example which shows how to plot a pixel. First I use the function to address surface memory:
UCHAR video_buffer = NULL;
Then I try to get the video pointer:
video_buffer = (UCHAR *)ddsd.lpsurface
And I get a following error: Cannot convert unsigned char to unsigned char.....
So how can I make it differently? I am a total beginner and this seems to be an obstacle as many of the book''s examples uses similar commands.
It looks like you need to declare video_buffer as a pointer.
UCHAR * video_buffer = NULL;
rathar than
UCHAR video_buffer = NULL;
UCHAR * video_buffer = NULL;
rathar than
UCHAR video_buffer = NULL;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement