diff --git a/lab_2/8_wildptr-fixed.cpp b/lab_2/8_wildptr-fixed.cpp index d060b1c..40b8ba0 100644 --- a/lab_2/8_wildptr-fixed.cpp +++ b/lab_2/8_wildptr-fixed.cpp @@ -2,14 +2,14 @@ #include #include -void crop(int num_strings, char** strings, int characters_cropped); +constexpr void crop(int num_strings, char** strings, int characters_cropped); -int main(int argc, char** argv) +int main(const int argc, char** argv) { /* crop the first two letters of each input argument, * by jumping from index 0 to index 2 */ - int jump_to_index = 2; + const int jump_to_index = 2; /* crop all of the strings in argv, except the one with index 0; * note that argv[0] is always the program's name. @@ -25,7 +25,7 @@ int main(int argc, char** argv) /* implementation that "crops" a string by incrementing it, so that * it effectively begins characters further ahead. */ -void crop(int num_strings, char** strings, int characters_cropped) +constexpr void crop(int num_strings, char** strings, const int characters_cropped) { assert(characters_cropped >= 0);