colour *col=new colour[10][10]; ...
delete []col;

Thanks,
Tyler Littlefield
http://tysdomain.com

  ----- Original Message ----- 
  From: Jos Timanta Tarigan 
  To: c-prog@yahoogroups.com 
  Sent: Wednesday, January 07, 2009 5:35 PM
  Subject: Re: [c-prog] function returning a 2D array?


  i think i got an exact value so it will be properly allocated. but how can i 
do that? i mean sytax-ly? :)

  Color* scan() is not working

  --- On Wed, 1/7/09, Brett McCoy <idragos...@gmail.com> wrote:

  > From: Brett McCoy <idragos...@gmail.com>
  > You can't return an array directly out of a function
  > like that, but
  > you can return a pointer to an array. Make you sure you
  > properly
  > allocate memory for the array, of course, and be careful of
  > returning
  > a pointer to an array created locally inside the function.



   

  __________ NOD32 3746 (20090107) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]

Reply via email to