Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <list>
- #include <vector>
- using namespace std;
- enum class knum { zero, one, two, three, four, five, six, seven, eight, nine, ten };
- const int knumCount = 11;
- int main() {
- vector<knum> tagVector = {knum::zero, knum::one, knum::two, knum::three, knum::four,
- knum::five, knum::six, knum::seven, knum::eight, knum::nine, knum::ten};
- random_shuffle(tagVector.begin(), tagVector.end());
- for (auto& e: tagVector) cout << (int )e << ' '; cout << endl;
- list<knum> tagList;
- tagList.assign(tagVector.begin(), tagVector.end());
- for (auto& e: tagList) cout << (int )e << ' '; cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement