i m practising C++. i just add c++ files in XCode and write some string splitting functionality in it. After that i include that C++ file i.e. extension of .mm file in my AppDelegate file and call function from .h file of C++ class. But i found one static error in red line which is 'iostream' file not found . I used latest XCode version 4.5 and iOS 6.0. Please see screen shot of my error or xcode screen.
I m tried to modify my code as per given link information but no success. :(
also i followed this link information as well, but result is same.
Thanks iHungry
Objective C
having .m
extensions for its implementation files. If you want to use C++
in Objective C
it should have .mm
extensions. you can include C++
header files in your .mm
file. But if you want to include your C++
header files in your .h
file, you need to check macro
for that, like
#ifdef __cplus
#include <iostream>
#endif
But, I haven't tried any functions by including C++
header file in .h
file. Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With