Merge branch 'g-collection' of https://github.com/bachelor-group-66-systemf/language into g-collection
This commit is contained in:
commit
87f5d7fe74
22 changed files with 1406 additions and 149 deletions
34
src/GC/tests/advance.cpp
Normal file
34
src/GC/tests/advance.cpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#include <iostream>
|
||||
#include <list>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
list<char> l;
|
||||
char c = 'a';
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
l.push_back(c++);
|
||||
}
|
||||
|
||||
auto iter = l.begin();
|
||||
auto stop = l.end();
|
||||
|
||||
while (iter != stop) {
|
||||
cout << *iter << " ";
|
||||
|
||||
iter++;
|
||||
}
|
||||
cout << endl;
|
||||
iter = l.begin();
|
||||
while (*iter != *stop) {
|
||||
cout << *iter << " ";
|
||||
iter++;
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
cout << "rebased" << endl;
|
||||
// cout << "iter: " << *iter << "\nstop: " << *stop << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue