Loading STL into Objective-C Project and Compiling

The Stack Overflow post about data structures says you can use STL in Objective-C and iOS. The link he gave has a link to download the STL as http://www.sgi.com/tech/stl/

It's nothing but header files and I'm not sure if I need any other files. But let them say it works. I thought I could just put the files in a folder under the project folder and add them all to the project I have, still a simple chat client. But will that make them all upload to my file? Is there a correct way to do this?

+3


source to share


1 answer


all you have to do is rename the file to * .mm. this tells the compiler the Objective-C ++ code. you can use both Objective-C object and C ++ object at the same time.



then if you want to use a vector, just #include <vector>

and use it like in normal C ++ code.

+4


source







All Articles