问题描述
我在练习C ++。我只是在XCode中添加c ++文件,并在其中写入一些字符串分割功能。之后,我包括C ++文件,即。我的AppDelegate文件中的.mm文件的扩展和从C ++类的.h文件调用函数。但我发现一个红线的静态错误,这是'iostream'文件未找到。我使用最新的XCode版本4.5和iOS 6.0。请参阅我的错误或xcode屏幕的屏幕截图。
>
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.
我m尝试根据给定的信息修改我的代码,但没有成功。 :(
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.
推荐答案
#ifdef __cplus
#include <iostream>
#endif
但是,我没有尝试过任何函数,包括
C ++
头文件在 .h
文件。希望它有帮助。
But, I haven't tried any functions by including
C++
header file in .h
file. Hope it helps.
这篇关于'iostream'文件未找到错误发生在xcode 4.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!