Assign array to local variable

 

Hi,

Is it possible to assign an array to a local variable? I've tried the following but I get a "pointer cannot be used" error.

 

class Foo {

private:

   const double *high; 

public: 

   void Foo(const double &a_high) {

       high = a_high;

   }; 

} ;

 
Alex:

Hi,

Is it possible to assign an array to a local variable? I've tried the following but I get a "pointer cannot be used" error.

 

class Foo {

private:

   const double *high; 

public: 

   void Foo(const double &a_high) {

       high = a_high;

   }; 

} ;

No, the only way I know of is wrapping the array into a class and passing an object in place of the array.
 
Ovo Cz:
No, the only way I know of is wrapping the array into a class and passing an object in place of the array.

Ok, Thanks Ovo Cz.

 

Annoying but I guess they have their reasons. 

Reason: