list<int> l;
list<int>::iterator start;
list<int>::iterator end;
list<int>::iterator mid;
for (int i = 0; i < 100; ++i)
l.push_back(i);
start= l.begin();
end= l.end();
mid = start+ (end- start) / 2;
cout << *mid << endl;
Okay I have a concrete example now. end- start does not compile.
ble.begin() + (ble.begin() - ble.end()) / 2or was it supposed to beble.begin() + (ble.end() - ble.begin()) / 2?last - start / 2, sostart/2obviously doesn't compile.