delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/02/00:39:29

Message-ID: <B0000041677@datasoft.datasoft.com.br>
From: "Cristovao Braga" <cbraga AT datasoft DOT com DOT br>
To: "Jeff Weeks" <pweeks AT execulink DOT com>
Cc: "djgpp list" <djgpp AT delorie DOT com>
Subject: Re: pointer trouble... need help
Date: Sun, 2 Mar 1997 02:29:41 -0300
MIME-Version: 1.0


> From: Jeff Weeks <pweeks AT execulink DOT com>
> I've got a structure:
> 
> tbuf *buf_data;
> bbuf *buf_data;
> tbuf = new buf_data[video.max_x];
> bbuf = new buf_data[video.max_x];
> 
> and now I want to copy the values from bbuf to tbuf.  The following
> should work shouldn't it?
> 
> tbuf = bbuf;

try *tbuf = *bbuf;

this way you'll referencing the values stored at the memory locations
instead of the memory location.

> 
> Jeff Weeks
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019