Request for member which is of non-class

前端 未结 2 607
抹茶落季
抹茶落季 2021-01-27 09:46

I\'ve got a C++ class I want to use which has all the code in the header file, rather than the CPP file. I\'m trying to call it from an objective-C file which inherits a UIViewC

相关标签:
2条回答
  • 2021-01-27 09:47

    The problem is likely in the declaration of the object that gives you the error, not in the header file. Sometimes the problem is hard to spot, you'll have to share some code if you can't figure it out by yourself.

    0 讨论(0)
  • 2021-01-27 09:55

    I'm not a C++ coder, so this was probably an obvious mistake, but if anyone else comes across a similar problem, I simply changed my code from:

    myObject.method();
    

    to

    myObject->method();
    
    0 讨论(0)
提交回复
热议问题