dimensionedScalar as class member
I am trying to write a small class. I feel like this should be trivial, but I can't figure out how to get a dimensionedScalar as a class member without errors =/.
I would like to have something along the lines of:
The error I am getting is "error: ‘((A*)this)->A::dimX’ does not have class type"
What am I missing?
Is that the actual code you're trying to compile?
Your function getX has no return value and the member variable dimX should not have brackets after it for a start.
Thanks for the reply
I typed it up in here, forgot to copy the returntype, thanks.
error: no matching function for call to ‘Foam::dimensioned<double>::dimensioned()’
I looked up the source code and found that a NULL constructor is called with empty brackets, which seems to work. However, I cannot seem to be able to assign any value afterwards.
|All times are GMT -4. The time now is 08:58.|