3

I'm trying to port some C++ code to Objective-C. It includes iostream and sstream, but Objective-C does not recognize these. What should be done?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
node ninja
  • 30,218
  • 57
  • 159
  • 248

1 Answers1

13

You can use iostream and sstream in Objective-C++.

Just make sure your source code file ends with .mm instead of .m and you will be able to use any standard C++ library you might need. Including <stream>.

Pablo Santa Cruz
  • 170,119
  • 31
  • 233
  • 283