G
Guest
the class:
public __gc class Vector {
private:
Double y, x, z;
public:
Vector() {
y(0),
x(0),
z(0)
{
}
};
Vektor(Double y, Double x, Double z){
y = x1;
x = x2;
z = x3;
}
Vector(String __gc* strVector); // "123.23,1232.23,4235345."
__property Double get_Y();
__property void set_Y(Double a);
__property Double get_X();
__property void set_X(Double b);
__property Double get_Z();
__property void set_Z(Double c);
};
Now i have another method which tries to return a vector:
class...
static Vektor* get_Vektor(String* e, String* p){
return new
Vektor(Convert::ToDouble(kind),Convert::ToDouble(domain),Convert::ToDouble(category));
}
...
end class
Vektor* obj = new Vektor();
obj = Access::get_Vektor(att1, att2);
Int16 kind = Convert::ToInt16(entity->get_Y()); // error
I got error about "object reference not set to an instance of an object
I think it's about the static method "getVektor()"...
Anyone can help me with this?
public __gc class Vector {
private:
Double y, x, z;
public:
Vector() {
y(0),
x(0),
z(0)
{
}
};
Vektor(Double y, Double x, Double z){
y = x1;
x = x2;
z = x3;
}
Vector(String __gc* strVector); // "123.23,1232.23,4235345."
__property Double get_Y();
__property void set_Y(Double a);
__property Double get_X();
__property void set_X(Double b);
__property Double get_Z();
__property void set_Z(Double c);
};
Now i have another method which tries to return a vector:
class...
static Vektor* get_Vektor(String* e, String* p){
return new
Vektor(Convert::ToDouble(kind),Convert::ToDouble(domain),Convert::ToDouble(category));
}
...
end class
Vektor* obj = new Vektor();
obj = Access::get_Vektor(att1, att2);
Int16 kind = Convert::ToInt16(entity->get_Y()); // error
I got error about "object reference not set to an instance of an object
I think it's about the static method "getVektor()"...
Anyone can help me with this?