Use a variable to set string length : I am working on a scanning system to make edits to very long strings. For the scanning I am using a string to contain the current letters being checked. I need to set the length of the string "scanSet" to the length of the variable "stringLength". The variable "stringLenght" is a constant but because it is set to the length of a different string it is considered not constant. Any fixes?

    	string inputScan;
        cout << "Enter string." << endl;
	    getline(cin, inputScan);
        const int stringLength = inputScan.length();
	    char scanSet[stringLength];