[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppClxTStringList
Forward declaration:
In the implementation (.cpp) file, #include Classes.hpp:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppClxTStringList
(C++ CLX) TStringList
TStringList is a container class for AnsiString, very close in functionality to a std::vector<std::string>.Forward declaration:
//Forward declaration
namespace Classes { class TStringList; };
In the implementation (.cpp) file, #include Classes.hpp:
- include <Classes.hpp>
How to: append one TStringList to another
Use the AddStrings function.std::auto_ptr<TStringList> stringList1(new TStringList); std::auto_ptr<TStringList> stringList2(new TStringList); stringList1->Add("A"); stringList1->Add("B"); stringList2->Add("C"); stringList2->Add("D"); stringList1->AddStrings(stringList2.get()); assert(stringList1->operator [](0)=="A"); assert(stringList1->operator [](1)=="B"); assert(stringList1->operator [](2)=="C"); assert(stringList1->operator [](3)=="D");
- include <memory>
- include <cassert>
Components using TStringList
- (know no CLX example yet)
Code links
Other links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
