|
-
May 27th, 2007, 09:26 PM
#1
[RESOLVED] Issue with ABCs - ERROR C2259
Hi,
I am getting trouble to make my ABC working.
I can not compile my dll as soon as I use an ABC. The compiler tells me error C2259: 'xlINSTRUMENTS' : cannot instantiate abstract class
I have searched around and I thought it was a signature problem but it does not look like since the 2 functions are really the same.
I thouth also it was a problem of object creation but it is unlikely also.
In order to create my xlMM object, I write the following line:
xlINSTRUMENTS * abc = new xlMM(..........);
with xlMM(..........) being the correct constructor.
or xlINSTRUMENTS abc = xlMM( ..... ) if I want to create the object it self and not a pointer.
I am under Visual studio .NET 2003 and I am trying to compile a Multithreaded dll.
I have enclosed the code at the end in order to be complete.
Any help would be greatly appreciated.
Lapin
//Abstract class definition
class xlINSTRUMENTS
{
private:
std::string Name;
public:
virtual double RetrieveInstrument( const double & ,const double & ) const = 0 ;
}
//Derived class definition
class xlMM ublic xlINSTRUMENTS
{
private:
...
public:
virtual double RetrieveInstrument(const double & ,const double & ) const ;
};
//virtual fonction definition
double xlMM::RetrieveInstrument( const double &InputHeader ,const double &InputValue ) const
{
return InputHeader;
};
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|