expected primary-expression before .....
Hi guys,
I added this piece of code into the original one: Code:
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::dragCoeff() const Code:
twoPhaseSystem.C: In member function ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::twoPhaseSystem::dragCoeff(const volScalarField&, const volScalarField&) const’: Code:
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::dragCoeff() const But this is totally fine: Code:
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::dragCoeff() const Code:
return drag_->K(const volScalarField& M30, const volScalarField& M20); Thanks |
Quote:
You need to distinguish parameter passing and receiving. When you receive a parameter in a function (blue, below), you must specify its type. You are already doing this. When you pass a variable to another function (purple, below), you must solely pass the variable, without including its type in front: the compiler already knows its type. If you do put its type in front, you are declaring a new variable, which you do not initialize. That will result in a compilation error. Quote:
Code:
|
Exactly! Thank you very much!!!!!!!!!
bro!! |
All times are GMT -4. The time now is 23:48. |