The cin object with the stream extraction operator (>>) will ignore a leading newline character in the input buffer.
The getline member function will not leave a newline character in the input buffer.
You should always follow the cin object with the stream extraction operator (>>) with the no-argument ignore member function because the cin object with the stream extraction operator (>>) always leaves a newline character in the input buffer.
You should never follow the getline member function with the no-argument ignore member function because the getline member function always removes the newline character that terminated input from the input buffer.
The argument of the isdigit function is a character.
The argument of the atoi function is a C-string.
A C++ string class variable cannot directly use the atoi function to convert the string representation of a number to a number. However, it can copy its contents to a C-string using either the c_str or data member functions, after which the C-string can use the atoi function.
The functions in the C++ standard library cctype, such as toupper and isdigit , are used with characters .
The functions in the C++ standard library cstdlib, such as atoi and itoa, are used with C-strings.
You cannot use an assignment operator to assign the value of one C-string to another. You will be assigning an address instead of a value.