line 14 is wrong. func_destination() is a member function of class example hence you need an instance of example in order to access the function like so:
1 2 3 4 5 6 7
int main()
{
example e;
string x;
x = e.func_destination();
cout<<x;
}
@ OP: No it is not. That is not how you call a classes member function. You are also trying to output an uninitialized variable and not returning anything from Main even though you declared that you would. As keskiverto pointed out, you misspelled "public:" and string and cout should be preceded by their namespace prefix.