Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The "&" operator can only be applied to a variable or other l-value

807575Sep 28 2004 — edited Sep 29 2004
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2004
Added on Sep 28 2004
1 comment
188 views