cout << return_value(word);
. word
in this case it is a string object, but the function you have defined (int return_value(char* word)
) is expecting a character pointer or char*
.word
(inside your main function) as a char array or char[x] (where x is the length of your array).string::c_str()
function (see: http://www.cplusplus.com/reference/string/string/c_str/)your code
[ /code ] (without the spaces), this makes it easier for us to read your code and help you! :D