1
4

1 回答 1

2

A few things to consider:

  1. Connector* Connector(); - what are you trying to do here? If you're trying to declare a pointer to a connector, do Connector* ptr_connector; or something. You're basically invoking a constructor, declaring a pointer, and giving neither a variable name - it's crazy!

  2. Did you actually implement the functions were seeing in the nested class, if not that's where your problem is! Also, did you implement them correctly for a nested class? The syntax is a little different if you're not implementing them inline in the class.

  3. ClientConnection::Connector* connector = client.Connector(); - This doesn't work either. you declared an explicit constructor in your class requiring a client connection object. But here, you're trying to create a connector without passing any client object. You don't have a constructor for Connector taking no parameters.

于 2012-06-28T13:57:26.320 回答