Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "address.h"
- #include <iostream>
- #include <string>
- int main() {
- std::string line;
- while (getline(std::cin, line)) {
- Address* address = new Address;
- try {
- Parse(line, address);
- }
- catch (...) {
- std::cout << "exception" << std::endl;
- delete address;
- continue;
- }
- try {
- Unify(address);
- }
- catch (...) {
- std::cout << "exception" << std::endl;
- delete address;
- continue;
- }
- try {
- std::cout << Format(*address) << std::endl;
- }
- catch (...) {
- std::cout << "exception" << std::endl;
- delete address;
- continue;
- }
- delete address;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement