I'm trying to write some code in C++ (for OpenFOAM) but I'm getting the error given in the title for this bit of code:
// Copy set
void backup
(
const polyMesh& mesh,
const word& fromName,
const topoSet& fromSet,
const word& toName
)
{
Info<< "Backing up " << fromName << " into " << toName << endl;
topoSet backupSet(mesh, toName, fromSet);
backupSet.write();
}
The full error is:
faceSet.C:51:18: error: cannot declare variable ‘backupSet’ to be of abstract type ‘Foam::topoSet’
The error is in this line:
topoSet backupSet(mesh, toName, fromSet);
From looking this up, I think I understand that topoSet maybe should be declared as a constant but I tried this and it made no difference.
I have a few errors of similar nature but I'm just trying to understand how to fix this one.