In an iPad app im using a thirdParty cpp file that acts as a controller for some UI functionality; its wired up with IB and a @class definition is all i need.
However now I’m trying to set a delegate on the cpp file and therefore have to include it in the implementation of my viewController.
including the cpp header in my implementation causes a stack of errors to appear much like this:
[cpp_header_file_path] error: expected
‘=’, ‘,’, ‘;’, ‘asm’ or
‘attribute‘ before ‘[cpp class]’
and even operators like this:
[cpp_header_file_path] error: expected
‘=’, ‘,’, ‘;’, ‘asm’ or
‘attribute‘ before ‘<‘ token
Can anyone shed some light on this?
Change the suffix of your files from .m (Objective-C) to .mm (Objective-C++).