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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…