As the character array "char* argsv[]"(the second argument for the main() method) contains the executable path in element[0], you can print the array of characters making up the patch using:
cout << argsv[0];
This displays on the console perfectly fine, however if I make my own array of characters and try to display this in the console, I have an interesting result.
The outcome is the character array displayed correctly, however there are some random characters proceeding. This is the snippet:
Character array (or character pointer) output expects a null-terminated character sequence. That means that there should be a null character '\0' after last symbol. Also that means that your array should be one large than amount of characters in it.
1 2 3
char year[5] = {'2', '0', '1', '5', '\0'};
//or
char year[] = "2015"; //Null character exist in string literals by definition