The "&" operator can only be applied to a variable or other l-value
807575Sep 28 2004 — edited Sep 29 2004Hi,
I am upgrading C++ 4.2 to 5.4 , during upgrade I am getting some error in my code.
The ERROR is :
Error: The "&" operator can only be applied to a variable or other l-value
The c++ code is:
..........................................
.............................................
IrsCashSeries* result = new (std::nothrow) IrsCashSeries(left.m_CashSeriesType, paths, periods);
result->m_CashMatrix = &((*left.m_CashMatrixVal) + (*right.m_CashMatrixVal)); // Error line
..............................................
............................................
_______________________________________________________________________________
here m_CashMatrix is in a header file:
class IrsCashSeries
{
........................................
.........................................
protected:
RWGenMat<double>* m_CashMatrix;
.............................................
};
Can anyone knows how to fix the problem?. I was correct when I compiled using 4.2 C++.
thanks a lot
MSP