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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -