c++ - EX_BAD_ACCESS when calling vector.empty() -


i'm getting ex_bad_access when calling vector.empty on empty vector.

bool empty = elements.empty(); 

its throwing exception here;

      /**        *  returns read-only (constant) iterator points 1 past        *  last element in %vector.  iteration done in        *  ordinary element order.        */       const_iterator       end() const       { return const_iterator(this->_m_impl._m_finish); } // exception 

when calling;

  /**    *  returns true if %vector empty.  (thus begin()    *  equal end().)    */   bool   empty() const   { return begin() == end(); } // exception 

the reason elements invalid object @ point. should never exception valid vector object.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -