Ferdig med 8
This commit is contained in:
parent
03b9bb9ab2
commit
f2eb3a6ddc
@ -2,14 +2,14 @@
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
||||
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_cropped> 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user