Skip to content

Instantly share code, notes, and snippets.

@adilsoncarvalho
Created April 16, 2014 13:13
Show Gist options
  • Save adilsoncarvalho/10872662 to your computer and use it in GitHub Desktop.
Save adilsoncarvalho/10872662 to your computer and use it in GitHub Desktop.
Simple list study on C++
#include <iostream>
#include <list>
using namespace std;
int main()
{
list<int> numeros;
list<int>::iterator item;
numeros.push_back(100);
numeros.push_back(200);
cout << "We have " << numeros.size() << " items" << endl;
for(item = numeros.begin(); item != numeros.end(); ++item)
{
cout << " * " << *item << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment