The following code block is producing and endless loop and I can't figure out why. Note that charv is just he second command line argument in the main function.

    int testNumber = 1;
    while(argv != '\0')
        std::cout << testNumber;

I wrote this piece of code just as a test to see if the loop could be controled using the '\0' element of the char array from the command line argument.

argv is not a char, it's a pointer to a pointer to a char, so the comparison argv != '\0' makes no sense. You really shouldn't be modifying argv directly by incrementing it anyway.

You are not incrementing argv index, nor are you testing argv index.