So I've had to change the instances of std::string with there System::String^ equivilants.
I've been working on this calculator for about 3 hours browsing the internet and finally I've got down the error count from 80 to 1, the only error is:
error C3145: 'operators' : global or static variable may not have managed type 'cli::array<Type> ^' with [ Type=operate ^ ] may not declare a global or static variable, or a member of a native type that refers to objects in the gc heap
I've tried a few different things but none of them work.
Here is the class and code structure for that section of my program.
// OPERATOR CLASS
ref class operate
{
public:
array<bool>^ param;
String^ name;
};
// ADD AN OPERATOR
operate^ addOp(String^ a, bool b, bool c)
{
operate^ temp;
//temp->param = gcnew array<bool>(2); // not sure whether this is needed
temp->name = a;
temp->param[0] = b;
temp->param[1] = c;
opNumber ++;
return temp;
}
// OPERATOR LIST
array<operate^>^ operators = // this is the line the error is on
{
addOp("PI" ,false, false),
addOp("E" ,false, false),
addOp("X" ,false, false),
addOp("Y" ,false, false),
addOp("Z" ,false, false),
addOp("ANS" ,false, false),
addOp("acosh" ,false, true),
addOp("asinh" ,false, true),
addOp("atanh" ,false, true),
addOp("cosh" ,false, true),
addOp("sinh" ,false, true),
addOp("tanh" ,false, true),
addOp("acos" ,false, true),
addOp("asin" ,false, true),
addOp("atan" ,false, true),
addOp("cos" ,false, true),
addOp("sin" ,false, true),
addOp("tan" ,false, true),
addOp("log" ,false, true),
addOp("ln" ,false, true),
addOp("!" ,true, false),
addOp("%" ,true, true),
addOp("^" ,true, true),
addOp("/" ,true, true),
addOp("*" ,true, true),
addOp("+" ,true, true)
};
This post has been edited by TheMagnitude: 03 February 2009 - 01:56 PM

New Topic/Question
Reply



MultiQuote




|