So I have a .h file and when I include iostream xcode says that header file doesnt exist. But what is making me mad is that whenever I go though the new file process choosing c++ class the default .h file comes with one line of code, which includes iostream.h
so when I import that to my Objective-C code it fails to compile.
So I have a .h file and when I include iostream xcode says that
Share
If you put
#include <iostream>in a.hfile, then you must be sure to only include that.hfile in C++ files (.cppor.cc) or Objective-C++ files (.mm). You’re getting a compiler error because you’re including your.hfile in a C (.c) or Objective-C (.m) file.