Skip to content

Instantly share code, notes, and snippets.

@GiangHoGoVap
Created October 21, 2020 11:16
Show Gist options
  • Select an option

  • Save GiangHoGoVap/5bf0670b97441da712abb7278237ab12 to your computer and use it in GitHub Desktop.

Select an option

Save GiangHoGoVap/5bf0670b97441da712abb7278237ab12 to your computer and use it in GitHub Desktop.
int main()
{
FragmentLinkedList<int> test(5);
for (int i = 0; i < 20; i++)
{
test.add(i, i * i + 10);
}
cout << test.toString() << endl;
//FragmentLinkedList<int>::Iterator it = test.begin();
FragmentLinkedList<int>::Iterator it = test.end(2);
it.remove();
//FragmentLinkedList<int>::Iterator it = test.end();
it++;
for ( ; it !=test.end() ; it++)
{
cout << *it << " ";
}
cout << endl;
for (it = test.begin(); it != test.end(); it++)
{
cout << *it << " ";
}
return 0;
}
@GiangHoGoVap

Copy link
Copy Markdown
Author

Screenshot (668)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment