i'm using stl list to do a simple inserting of a range of value into the list. The problem i have is that when i do a push_front i couldnt see the value when i did a displayed of my list, but when i did a count it show that i have the number of range but couldnt see my newly inserted value. Could someone explain to me wat happen?

int main()
 list<int> myList;
 list<int>::iterator p = myList.begin() ;
 cout << "List initialised" <<endl;
 cout << "List: " ;
 while(p != myList.end())
    cout << *p << " ";

 cout <<endl;
 cout << "Count: " << myList.size()<< endl;

Iterator is showing the first begin "adress" of list.Then you are adding the numbers.So they are not in sequence of the first ones.
The size of list will the count of all numbers.But iterator wont show last added ones.

line 11: that works only at the time the line is executed. If you add new items to the front then you have to call begin() again in order to get pointer to the new front.

thanks guys!! finally understand it!!! thanks again guys