2 Replies - 134 Views - Last Post: 09 September 2012 - 07:09 AM Rate Topic: -----

#1 oomjos  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 32
  • Joined: 09-September 12

Need to return a double pointer to a fucntion.

Posted 09 September 2012 - 04:55 AM

 
double *Row :: getData()
{
  double *newRow = new double[size];
  
  for(int i =0; i<size; i++)
  {
    newRow[i] = dArray[i];
  }
  
  return *newRow;
}  

 // This doesn't work for some reason.



Is This A Good Question/Topic? 0
  • +

Replies To: Need to return a double pointer to a fucntion.

#2 Salem_c  Icon User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 1578
  • View blog
  • Posts: 3,005
  • Joined: 30-May 10

Re: Need to return a double pointer to a fucntion.

Posted 09 September 2012 - 04:58 AM

> 10 return *newRow;
Just delete the *

As in
return newRow;
Was This Post Helpful? 1
  • +
  • -

#3 oomjos  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 32
  • Joined: 09-September 12

Re: Need to return a double pointer to a fucntion.

Posted 09 September 2012 - 07:09 AM

View PostSalem_c, on 09 September 2012 - 04:58 AM, said:

> 10 return *newRow;
Just delete the *

As in
return newRow;



thanks!!!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1