[ create a new paste ] login | about

Link: http://codepad.org/Lcw6kgpi    [ raw code | output | fork ]

xtofl - C++, pasted on Aug 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
struct PData{};
typedef void (*EnqueueCallback)( PData *pd );


class CSerialSniffer
{
public:
    void set_enqueue_callback(EnqueueCallback a_pEnqueueCallback );
};

class SomeClass
{
public:
   void enqueue( PData *pd ){}
  CSerialSniffer* serialSniffer;

  SomeClass(): serialSniffer(new CSerialSniffer()) 
  {
    this->serialSniffer->set_enqueue_callback(this->enqueue);
  }
};


Output:
1
2
3
t.cpp: In constructor 'SomeClass::SomeClass()':
Line 19: error: no matching function for call to 'CSerialSniffer::set_enqueue_callback(<unresolved overloaded function type>)'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: