Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created October 1, 2015 03:16
Show Gist options
  • Save AndyNovo/b9ef8acc5c6ca402cec0 to your computer and use it in GitHub Desktop.
Save AndyNovo/b9ef8acc5c6ca402cec0 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <forward_list>
using namespace std;
int main() {
forward_list<int> sll;
sll.push_front(231);
sll.push_front(321);
sll.push_front(666);
for (auto element: sll){
cout << element << endl;
}
for (auto itr = sll.begin(); itr != sll.end(); itr++){
cout << *itr << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment