Hello,
I wrote a new NDmaterial that implements all of the pure virtual functions but when I attempt to compile it into a DLL using Visual Studio 2010 it continues to give me the below error:
error C2259: Cannot instantiate abstract class
Below is my header file; is there something I am missing or is there something else that could be causing this error?
Thanks for the help in advance,
-Phil
class CoupledConcreteFiber3d: public NDMaterial
{
public:
CoupledConcreteFiber3d (int tag, UniaxialMaterial *conc, UniaxialMaterial *steel,
int SectTyp, double fc, double epsc0, double rou1, double rou2, double rho);
CoupledConcreteFiber3d (void);
~CoupledConcreteFiber3d (void);
int setTrialStrain (const Vector &strain);
int setTrialStrain (const Vector &strain, double theta);
int setTrialStrain (const Vector &strain, const Vector &rate);
double getRho(void);
const Matrix &getTangent (void);
const Matrix &getInitialTangent (void) {return this->getTangent();};
const Vector &getStress (void);
const Vector &getStrain (void);
const Vector &getCommittedStress(void);
const Vector &getCommittedStrain(void);
int commitState (void);
int revertToLastCommit (void);
int revertToStart (void);
NDMaterial *getCopy (void);
NDMaterial *getCopy (const char *type);
const char *getType (void);
int getOrder (void);
protected: (the rest...)
Instantiating A Class
Moderators: silvia, selimgunay, Moderators
Re: Instantiating A Class
Hey Guys, I figured out why it was saying I was trying to instantiate a abstract class. The issue was in the getType. I posted the correct way to meet the pure virtual of the NDMaterial below.
const char* getType (void) const;
Hope this can help someone.
const char* getType (void) const;
Hope this can help someone.