How does one initialise an OFstream in the constructor?
Hi,
I have a class which contains an OFstream member Code:
OFstream outFile_; Code:
Foam::myClass::myClass I have tried initialise the OFstream object in the main constructor (not the quick way above), but it is wrong: Code:
if(Pstream::master()) Philip |
You can use the conditional operator in initialization lists. Here's an example from my code:
Code:
convergence_ Code:
item -Dave |
Dave,
Thanks, this looks like what I need. I tried: Code:
outFile_ Code:
error So as a work-around, I have done this: Code:
outFile_ Thanks for the help, Philip |
All times are GMT -4. The time now is 09:27. |