Changed operator < to != (#4004)

This commit is contained in:
Priti Xavier 2020-09-29 20:50:47 +08:00 committed by GitHub
parent 6e4b3a5f31
commit e07193e6b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -915,7 +915,7 @@ ST.erase(20); // Will erase element with value 20
// Set ST: 10 30
// To iterate through Set we use iterators
set<int>::iterator it;
for(it=ST.begin();it<ST.end();it++) {
for(it=ST.begin();it!=ST.end();it++) {
cout << *it << endl;
}
// Output: