fork download
  1. #include <list>
  2. #include <string>
  3.  
  4. int main()
  5. {
  6. std::list<std::string> mylist;
  7. mylist.push_back("random stuff");
  8. std::list<std::string>::iterator it;
  9. it=mylist.begin();
  10. std::string mystr;
  11. //and this <strike>doesn't</strike> work:
  12. mystr=*it;
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 2956KB
stdin
Standard input is empty
stdout
Standard output is empty