I'm working on assigning an input string from the user to a char* pointer variable because that is what the college has assigned for me to do. However, I find it impossible to do that because of this error:
cannot convert 'std::__cxx11::string*' {aka 'std::__cxx11::basic_string'} to 'char' in assignment
Relevant code:
int secretCode;
string inputString;
char * inputPointer;
cout << "Please enter a positive whole number for the secret key: ";
cin >> secretCode;
cout << "Enter a string to be encoded: ";
getline(cin, inputString,'\t');
inputPointer = &inputString;
cout << *inputPointer;