? / professional-program-21-ErrorCorrelatorPqueue-ErrorCorrelatorTest.c
include <ErrorCorrelator.h> include <iostream> using namespace std; int main(int argc, char** argv) { ErrorCorrelator ec; ec.addError(Error(3, "Unable to read file")); ec.addError(Error(1, "Incorrect entry from user")); ec.addError(Error(10, "Unable to allocate memory!")); while (true) { try { Error e = ec.getError(); cout << e << endl; } catch (out_of_range& ) { cout << "Finished processing errors\n"; break; } } return (0); }
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.