Professional Documents
Culture Documents
reads strings from stdin, inserts them in a set container, and prints them sorted on stdout.
try-error
try{
throw invalid_argument( error );
}catch ( invalid_argument &e ){
cout << e.what() << endl;
}
traversing a tree
-preorder : 1) visit current node 2) visit left subtree 3) visit right subtree
-inorder: 1) visit left subtree 2) visit current node 3) visit right subtree
-postorder: 1) visit left subtree 2) visit right subtree 3) visit current node