mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
Changed operator < to != (#4004)
This commit is contained in:
parent
6e4b3a5f31
commit
e07193e6b4
@ -915,7 +915,7 @@ ST.erase(20); // Will erase element with value 20
|
|||||||
// Set ST: 10 30
|
// Set ST: 10 30
|
||||||
// To iterate through Set we use iterators
|
// To iterate through Set we use iterators
|
||||||
set<int>::iterator it;
|
set<int>::iterator it;
|
||||||
for(it=ST.begin();it<ST.end();it++) {
|
for(it=ST.begin();it!=ST.end();it++) {
|
||||||
cout << *it << endl;
|
cout << *it << endl;
|
||||||
}
|
}
|
||||||
// Output:
|
// Output:
|
||||||
|
Loading…
Reference in New Issue
Block a user