0

I am new to C++, can anybody provide me some sample program's for String array and Arraylist/list in C++

Thanks in Advance.

2 Answers 2

3

You can use std::vector<std::string>. it can be accessed like a normal array (i.e. it provides operator[]). See here for the methods provided by vector. You can insert the elements using push_back and access elements either using an iterator or operator[]

[3]: [3]: http://www.cplusplus.com/reference/stl/vector/operator%5B%5D/

[3]: [3]: http://www.cplusplus.com/reference/stl/vector/operator%5B%5D/

Sign up to request clarification or add additional context in comments.

Comments

0

You can refer the following urls,

1. String

2. Character Sequence

3. STL

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.