Variables inside classes
I'm creating a class but I cannot declare variables inside my class to then use them in my member functions. Here is the error I get.
const scalar pi2=3.14;
error: ISO C++ forbids initialization of member ‚pi2‚
error: making ‚pi2‚ static
BTW: if you really just need PI, you could also consider using the constants provided with OpenFOAM:
That worked just fine. Thanks!
|All times are GMT -4. The time now is 13:55.|