From: Jeff Weeks Newsgroups: comp.os.msdos.djgpp Subject: Re: pointer trouble... need help Date: 3 Mar 1997 22:54:26 GMT Organization: Internet News Service Lines: 34 Message-ID: <5ffkr2$gu2@nr1.toronto.istar.net> References: <5f9tk7$2mg AT nr1 DOT toronto DOT istar DOT net> <3318B49E DOT 78D96981 AT alcyone DOT com> NNTP-Posting-Host: news.linkd.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit XPident: Unknown To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > > tbuf *buf_data; > > bbuf *buf_data; > > This should be > > buf_data *tbuf; > buf_data *bbuf; Yes I know... that was a typo :) > Are you trying to copy the pointers or copy _what bbuf_ is pointing to into > what tbuf is pointing to? Yep, that's what I was trying to do. However, I needed to swap tbuf and bbuf... that was my problem... stupid mistake :) > If it's the former, then the above is correct, but now what tbuf was > originally pointing to is lost (you have no more references to it). If you > want to copy what is being referenced by those pointers, then you need > > memcpy(tbuf, bbuf, video.max_x*sizeof(buf_data)); Yep... that's how I originally had it setup... but it was too slow so I just used pointers. It's working now... yeah! :) Jeff Weeks -------------------------------------------- - Code X Software - Programming to a Higher Power email: mailto:pweeks AT execulink DOT com web: http://www.execulink.com/~pweeks/ --------------------------------------------