HELP!!! compiler seems confused...
-
hi all... ok, ill get to the nuts and bolts of the problem... i keep getting a C2259 error ('class' : cannot instantiate abstract class due to following members: ) now the class it is complaining about is one that instantiates IDataParameterCollection and ArrayList... specifically:
public __gc class NewSQLParameterCollection: public ArrayList, public IDataParameterCollection{};
and the function it is complaining about is this one...bool Contains(String *p) { //if IndexOf returns a value less than 0, then we know that //the item doesn't exist if (this->IndexOf(p) >= 0) return true; else return false; }
(umm, and before you say that i am missing the NewSQLParameterCollection:: indentifier, i should mention that i am inlining the call within the class header... :)) now the problem occurs when in a subsequent class i call the followingfunction test::sometest() { NewSQLParameterCollection *p = new NewSQLParameterCollection(S"Name", Object); }
it says that it can't find the function (as inbool Contains(...)
) above, but as you can see, it's there... any ideas? this is for an open source C++.NET MySQL driver i am writing, so any help would be GREATLY appreciated... cheers and thanks nik Nik Vogiatzis PhD Candidate: University of South Australia +++++++++++++++++++++++++++ Developing new generation Traffic Micro-simulation Tools for Traffic Engineers em: nikolaos.vogiatzis@unisa.edu.au -
hi all... ok, ill get to the nuts and bolts of the problem... i keep getting a C2259 error ('class' : cannot instantiate abstract class due to following members: ) now the class it is complaining about is one that instantiates IDataParameterCollection and ArrayList... specifically:
public __gc class NewSQLParameterCollection: public ArrayList, public IDataParameterCollection{};
and the function it is complaining about is this one...bool Contains(String *p) { //if IndexOf returns a value less than 0, then we know that //the item doesn't exist if (this->IndexOf(p) >= 0) return true; else return false; }
(umm, and before you say that i am missing the NewSQLParameterCollection:: indentifier, i should mention that i am inlining the call within the class header... :)) now the problem occurs when in a subsequent class i call the followingfunction test::sometest() { NewSQLParameterCollection *p = new NewSQLParameterCollection(S"Name", Object); }
it says that it can't find the function (as inbool Contains(...)
) above, but as you can see, it's there... any ideas? this is for an open source C++.NET MySQL driver i am writing, so any help would be GREATLY appreciated... cheers and thanks nik Nik Vogiatzis PhD Candidate: University of South Australia +++++++++++++++++++++++++++ Developing new generation Traffic Micro-simulation Tools for Traffic Engineers em: nikolaos.vogiatzis@unisa.edu.auYou probably need to uniquely identify your implementation.
bool IDataParameterCollection::Contains(String *p) { //if IndexOf returns a value less than 0, then we know that //the item doesn't exist if (this->IndexOf(p) >= 0) return true; else return false; }
Roger Stewart "I Owe, I Owe, it's off to work I go..."
-
You probably need to uniquely identify your implementation.
bool IDataParameterCollection::Contains(String *p) { //if IndexOf returns a value less than 0, then we know that //the item doesn't exist if (this->IndexOf(p) >= 0) return true; else return false; }
Roger Stewart "I Owe, I Owe, it's off to work I go..."
hi roger... yeah, already tried that, and then it comes up with:
MySqlParameterCollection.h(23) : error C3244: 'IDataParameterCollection.Contains' : this method was introduced by 'System::Data::IDataParameterCollection' not by 'System::Data::IDataParameterCollection'
which is strange... however, you did inspire me and i tried this:bool MySqlParameterCollection::Contains(String *p) { //if IndexOf returns a value less than 0, then we know that //the item doesn't exist if (this->IndexOf(p) >= 0) return true; else return false; }
and that seems to have removed one of the 'errors', i just need to workout why the same technique is not working for__property bool get_IsNullable(void)
for MySqlParameter, and i will have it! :-D cheers and thanks for your assistance roger... nik Nik Vogiatzis PhD Candidate: University of South Australia +++++++++++++++++++++++++++ Developing new generation Traffic Micro-simulation Tools for Traffic Engineers em: nikolaos.vogiatzis@unisa.edu.au