Original Post
I want to print 5 in cout but it is generating error help me please i am complete newbie
#include <iostream>
#include <string>
using namespace std;
int* geppSize(string* const text2);
main()
{
string text1 = "Hello";
int *pgetsize = geppSize(&text1); //passing hello to function
cout << "Size of text:" << *pgetsize << endl;
system("pause");
return 0;
}
int* geppSize(string* const text2)
{
int* a = (*text2).size();
return &a
}