Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. HELP!!! compiler seems confused...

HELP!!! compiler seems confused...

Scheduled Pinned Locked Moved Managed C++/CLI
helpcsharpc++cssmysql
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nik Vogiatzis
    wrote on last edited by
    #1

    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 following function test::sometest() { NewSQLParameterCollection *p = new NewSQLParameterCollection(S"Name", Object); } it says that it can't find the function (as in bool 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

    R 1 Reply Last reply
    0
    • N Nik Vogiatzis

      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 following function test::sometest() { NewSQLParameterCollection *p = new NewSQLParameterCollection(S"Name", Object); } it says that it can't find the function (as in bool 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

      R Offline
      R Offline
      Roger Stewart
      wrote on last edited by
      #2

      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..."

      N 1 Reply Last reply
      0
      • R Roger Stewart

        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..."

        N Offline
        N Offline
        Nik Vogiatzis
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups