|
-
July 12th, 2006, 10:58 AM
#1
Dump STL List
Can anyone tell me how to go about dumping lists 1 and 2 from the following code?
int main() {
list<string> l1;
list<string> l2;
read_file("file1.txt",l1,true);
read_file("file2.txt",l2);
list<string>::iterator i1, i2;
int pos;
for (i1 = l1.begin(); i1 != l1.end(); ++i1) {
for (i2 = l2.begin(); i2 != l2.end(); ++i2) {
if ( -1 != i1->find(*i2)) break;
}
if (i2 == l2.end()) cout << "Missing: " << *i1 << endl;
}
}
-
July 12th, 2006, 03:53 PM
#2
Re: Dump STL List
sorry, figured it out. stupid of me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|