CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Abstract type problem

    Hi people,

    I am really struggling with this one!

    My class and implementation: (it should inherit from MyFramework::

    ------------------------- >MyConnection.h

    #ifndef MYCONNECTION_H_
    #define MYCONNECTION_H_

    #include "TcpReceiver.h"

    class MyConnection : public MyFramework::TcpReceiver {

    MyConnection(const std::string &cfg, const std::string &feed_name);




    #include <iostream>
    #include "MyConnection.h"

    using namespace std;
    using namespace MyNamespace;
    using namespace MyFramework;

    MyConnection::MyConnection(const std::string &config, const
    std::string &connection){

    cout<<("Calling constructor")<<endl;



    ------------------------> In my main, I do this:

    MyConnection recv(config, connection);

    ERROR: cannot declare variable recv to be of abstract type

    Now this is driving me nuts.HELP!

  2. #2
    Join Date
    Nov 2006

    Re: Abstract type problem

    What pure virtual functions in MyFramework::TcpReceiver are not in MyConnection?
    If my post was interesting or helpful, perhaps you would consider clicking the 'rate this post' to let me know (middle icon of the group in the upper right of the post).

  3. #3
    Join Date
    Apr 2007
    Mars NASA Station

    Re: Abstract type problem

    Yes, as pointed out JVene. There are some virtual function in base class that are not defined in derived class.

    Look into it.
    Thanks for your help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.