diff options
-rw-r--r-- | 6p18.cpp | 6 | ||||
-rw-r--r-- | 6p19.cpp | 22 | ||||
-rw-r--r-- | 6p20.cpp | 9 |
3 files changed, 31 insertions, 6 deletions
@@ -1,12 +1,14 @@ -#include <iostream> /* * - * Description + * 6.18 * * */ int main () { + + // bool compare(matrix &rm1, matrix &rm2); + // std::vector<int>::iterator change_val(int i, std::vector<int>::iterator iter); return 0; } @@ -1,12 +1,30 @@ -#include <iostream> /* * - * Description + * 6.19 * * */ int main () { + + /* + double calc(double); + int count(const string &, char); + int sum(vector<int>::iterator, vector<int>::iterator, int); + vector<int> vec(10); + + (a) + calc(23.4, 55.1); // illegal, only 1 argument + + (b) + count("abcda", ’a’); // legal + + (c) + calc(66); // legal + + (d) + sum(vec.begin(), vec.end(), 3.8); // legal + */ return 0; } @@ -1,12 +1,17 @@ -#include <iostream> /* * - * Description + * 6.20 * * */ int main () { + + /* + We should do it when we only need to read the data. + There is no point accidentally writing to something we did not intend to write to. + Because if we had used const we would not be allowed to. + */ return 0; } |