G
Gena
Hi ,
I'm a newbe to programming and have a small question:
I made a small program with a class. in the class's header file I have
: double *ptr_output;
Void main()
{
double result[4];
class class_name(4); //constructor
class.method(result);
}
class.method(double *output)
{
memcpy(output,ptr_output,4);
}
class constructor
{
ptr_output = new double[length];
}
Why doesn't this work ? I want the method to peform some work on the
data and then return it to the result array.
Please help
I'm a newbe to programming and have a small question:
I made a small program with a class. in the class's header file I have
: double *ptr_output;
Void main()
{
double result[4];
class class_name(4); //constructor
class.method(result);
}
class.method(double *output)
{
memcpy(output,ptr_output,4);
}
class constructor
{
ptr_output = new double[length];
}
Why doesn't this work ? I want the method to peform some work on the
data and then return it to the result array.
Please help