Skip to content

Commit

Permalink
Merge pull request pezy#72 from Sublele/master
Browse files Browse the repository at this point in the history
A modify of ch05/ex5_17.cpp
  • Loading branch information
pezy authored Aug 23, 2016
2 parents 28d5cc3 + ef9db35 commit 5e03d64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ch05/ex5_17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ int main()
for (decltype(vec1.size()) i = 0; i != size; ++i) {
if (vec1[i] != vec2[i]) {
cout << "false" << endl;
break;
return 0;
}
if (i == size - 1) cout << "true" << endl;
}

cout << "true" << endl;
return 0;
}
8 changes: 6 additions & 2 deletions ch05/ex5_25.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ int main(void)
cout << "Input two integers: ";
}
catch (runtime_error err) {
cout << err.what() << "\n"
<< "Try again.\nInput two integers: ";
cout << err.what() ;
cout << "\nTry Again? Enter y or n:" << endl;
char c;
cin >> c;
if (!cin || c == 'n')
break;
}
}

Expand Down

0 comments on commit 5e03d64

Please sign in to comment.