Last active
August 29, 2015 14:11
-
-
Save 4u9u5tsong/cac025ec5f388b304cc0 to your computer and use it in GitHub Desktop.
c++, read numbers, many lines, and different # in each line, remove redundant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifstream pbinfile(argv[2]); | |
vector<unordered_set<int> > numbers; | |
while(getline(pbinfile, stemp)){ | |
istringstream buffer(stemp); | |
vector<int> line((istream_iterator<int>(buffer)), | |
istream_iterator<int>()); | |
unordered_set<int> s(line.begin(), line.end()); | |
numbers.push_back(s); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment