php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Better way to erase elements from a std::list? in c++ 2011
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
Better way to erase elements from a std::list? in c++ 2011

Code:
list<int> m_list; // Fill list with int values... // Find ints == 4 and erase them auto it = m_list.begin(); if (*it == 4) { it = m_list.erase(it); } while (it != m_list.end()) { ++it; if (*it == 4) { it = m_list.erase(it); }

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
Better way to erase elements from a std::list? in c++ 2011 - by Vuhelper - 07-20-2011, 10:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  array project code c++ 2011 Vuhelper 0 1,342 12-10-2011, 06:32 PM
Last Post: Vuhelper
  factorial in C++ code 2011 Vuhelper 0 1,010 12-10-2011, 06:31 PM
Last Post: Vuhelper
  Linked list using arrays? Vuhelper 0 2,426 11-05-2011, 05:07 PM
Last Post: Vuhelper
  stack during function call in C++ 2011 Vuhelper 0 2,093 11-05-2011, 05:05 PM
Last Post: Vuhelper
  What is the Thing Queue? in c++ 2011 Vuhelper 0 1,843 11-05-2011, 05:02 PM
Last Post: Vuhelper
  ASCII to char conversion code in C++ 2011 Vuhelper 0 1,783 11-05-2011, 05:01 PM
Last Post: Vuhelper
  Tell me can we say that in easy form List is the Database ? Vuhelper 0 2,016 10-13-2011, 10:38 PM
Last Post: Vuhelper
  How to write a summation in a sequence? C++ 2011-12 Vuhelper 2 1,440 09-19-2011, 04:53 AM
Last Post: Xpert
  GetPixel problem in c++ 2011-12 Vuhelper 0 2,558 09-18-2011, 07:12 PM
Last Post: Vuhelper
  C++ with loop code 2011-12 Vuhelper 0 1,039 09-18-2011, 07:09 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support