Mail Archives: djgpp/1997/03/03/19:48:31
> >tbuf *buf_data;
> >bbuf *buf_data;
>
> I'm not very familar with C++. However, the above two points (in C) should be:
>
> buf_data *tbuf;
> buf_data *bbuf;
Doe! He he... I must have been out to lunch when I typed up this
message :)
> tbuf = bbuf will merely have two pointers to the same memory. This will not
> copy the contents pointed to by bbuff into the memory allocated by new. In
> fact, the memory allocated by the second new will no longer be accessable at
> all. To copy memory blocks, the easiest way to is use one of the memory copy
> functions such as memcpy(tbuf,bbuff,video.max_x);
To slow for what I'm doing... it turns out I have it right afterall :)
The thing is, I needed to swap tbuf and bbuf... not just assign bbuf to
tbuf... stupid mistake!
Jeff Weeks
--------------------------------------------
- Code X Software -
Programming to a Higher Power
email: mailto:pweeks AT execulink DOT com
web: http://www.execulink.com/~pweeks/
--------------------------------------------
- Raw text -