[.net] can't create an array of managed objects
I think the syntax might be wrong.
I'm not sure though since I haven't programmed in c++ for quite a while.
Try something like this:
System::Double[] Something = new System::Double[5];
I'm not sure though since I haven't programmed in c++ for quite a while.
Try something like this:
System::Double[] Something = new System::Double[5];
What is the error message?
I believe you have to use a pointer. At least in C++ 1.1 I did.
System::Double * array[] = new Double[6];
I believe you have to use a pointer. At least in C++ 1.1 I did.
System::Double * array[] = new Double[6];
None of that is really helping me. Here is a more direct example:
I keep getting this error:
DBEngine.h(114) : error C4368: cannot define 'InterestRate' as a member of managed 'SavingsInterestRatesAndFees': mixed types are not supported
Thanks for all your help,
exorcist_bob
ref class SavingsInterestRatesAndFees{public: System::String^ Name; System::Double InterestRate[]; System::Double PercentYieldRate[5]; System::Double MinimumOpeningDeposit; System::Double MinimumMaintainedBalance; System::Double MonthlyServiceFee; System::Double MinimumRequiredToWaiveServiceFee; SavingsInterestRatesAndFees();};SavingsInterestRatesAndFees::SavingsInterestRatesAndFees(){ InterestRate = gcnew System::Double[5];};
I keep getting this error:
DBEngine.h(114) : error C4368: cannot define 'InterestRate' as a member of managed 'SavingsInterestRatesAndFees': mixed types are not supported
Thanks for all your help,
exorcist_bob
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement