Home Comments

AMI Error

My class:
class Cprintcallback: virtual public printspace::AMI_printI_print//AMI_printI_print is callback
{
public:

virtual void ice_response(Ice::Int &result)
{

printpos(result);
};

virtual void ice_exception(const Ice::Exception&)
{
return;
};
};

AMI_printI_printPtr printcallback;//this is callback object

but when use printcallback=new Cprintcallback();
C++ tell me error:'Cprintcallback' : cannot instantiate abstract class due to following members:

Would can I do??please help me! Thank you!

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    We'll be happy to help you once you set your signature. See this [thread=1697]thread[/thread] for information on how to set it. Please, also provide the slice definition of the interface where the print method is defined.

    Cheers,
    Benoit.
  • My interface print by slice:
    module printspace
    {
    interface printI
    {
    ["ami"] int print();
    };
    };
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    [...]
    but when use printcallback=new Cprintcallback();
    C++ tell me error:'Cprintcallback' : cannot instantiate abstract class due to following members:

    What members exactly? What is the complete error message? Your first post didn't list the members that caused the class to be abstract.
  • Thank you for your answer, I have solved it.
    ice_response(int result ) is ok
Sign In or Register to comment.