during my 2nd month learning C++ I got to this: STRING type function to build up and return menu from two user-input dishes (compliled and run in VisualStudio2013)
#include "../../std_lib_facilities.h"
string LeMenu(string meal, string dessert) //a F() concatenates 2 strings
{
return meal, dessert; //also tried meal+dessert
}
int main()
{
string course1, course2;
cout << "What is your chice today Sir?\n";
cin >> course1 >> course2; //request to input meals
LeMenu(course1,course2);
cout << "Is " << LeMenu << " ok?\n"; //here we output
keep_window_open();
}
But it always returns a HEXADECIMAL VALUE, and I do not know why: (compliled and run in VisualStudio2013)
Is 012D15CD ok?
instead of Is JamEggs ok? (as an example)
From what I have learnt I do not see why, my text book does not even suggests this as a likely issue and I can not find any hint on the internet!. More than a way to solve it it would be nice to understand if this is an expected mssbehavior or not. Thank you all!