So, this returns an error on execution, no errors shown in the debugger.
Debug assertion failed!
Expression: String subscript out of range.
For information on how your program can couse an assertion failure, see the visual c++ documentation on asserts.
int main()
{
// declaring variables
string input = "";
int firstChar;
// process:
cout << "Please enter a valid sentence (with spaces):\n>";
getline(cin, input);
cout << "first char is " + input[0] << endl << endl;
firstChar = input.length();
cout << "last char is " + input[firstChar];
// stop and return success
getchar();
return 0;
}