What is a C++ object of the type vector<char,allocator<char> > and how can it be used? -


i have c++ object of type vector<char,allocator<char> >. conceptually, expect list of boolean values. how should access (for example, print boolean value of each of elements)?

if able use range for, can use:

for ( auto el : v ) {     // use el } 

if still using c++03, can use:

vector<char,allocator<char> >::const_iterator iter = v.begin(); vector<char,allocator<char> >::const_iterator end = v.end(); ( ; iter != end; ++iter ) {    char el = *iter;    // use el } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -