How do I use the rope from C++ STL in Xcode

669 Views Asked by At

Apologies if I'm asking a silly newbie question. I'm new to C++ (familiar with C and objective C) and wanted to use the rope from the standard template library. Is this included with the libraries that Xcode uses? I have tried #include <vector> and the same for map successfully and also ext/hash_map. However rope does not seem to be available. Do I just have to download the source and include it in my project?

2

There are 2 best solutions below

2
On BEST ANSWER

Unfortunately "Rope" is not part of the C++ standard!

C++ Overview: http://www.cplusplus.com/reference/

1
On

From the link you posted:

This distribution of the STL consists entirely of header files: there is no need to link to any library files.

This means the steps to use it are:

  • download the source code for SGI's STL implementation

  • add them to your include path

  • include files as necessary in your code

  • compile

That said, the link you posted is not the C++ standard library. It is an implementation of STL, (the precursor to the C++ standard library) with a few (non-standard) additions. In particular, the rope implementation you found is a non-standard adition.