Question: Write a function which takes two string variables not C strings as inputs and compares them. If they are equal, the function should return 0. If the first-string is less than the second string, return a negative number. If the first string is greater than the second string, return a positive number.
You are not allowed to use the compare method of the string data type. You must use the comparison operators. Do not write a main function. Your function does not do any cout or cin.
Be sure to properly format all your code. Add comments to your code.