I have a question and I could not find a solution, so I ask here 🙂
I want to create an Foundation-based terminal application/script using Xcode–>Mac–>New–>Command Line Tool–>Foundation
This works and all, but then I want to ADD header.h files to my project.
One of this header.h files does the following:
#include <iostream>
This fails with the error: iostream file not found.
For a test I make a new c++ based terminla script and it does exactly the same:
#include <iostream>
But for some unknown reason it does not fail with an error.
Can anyone tell me, why the c++ script works to include and the objective c not?
objective c: .h file
c++: .cpp file
I renamed the .h to .cpp but then it does not find the NSString and such things.. any solution to use iostream and objective c?
I really need that, thanks
If you want to use both Objective-C and C++ (called Objective-C++) from within the same source module, then use the
.mmfile extension.