Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

练习6.18答案需要改进 #35

Open
Spicy-Jelly opened this issue Aug 12, 2021 · 0 comments
Open

练习6.18答案需要改进 #35

Spicy-Jelly opened this issue Aug 12, 2021 · 0 comments

Comments

@Spicy-Jelly
Copy link

6.18中的a,函数名是只有比较功能。输入的实参可能是右值或者常量引用。应该改成const更合理
(a) bool compare (const matrix &m1, const matrix &m2);

b中我感觉可以用const int i,比 int i更好。不需要更改i的值,传const int &i,效率比传int i更高。
(b)vector::iterator change_val(const int &i, vector::iterator itor);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant