When the get() function returns, the local variable goes out of scope. I.e., it's value becomes undefined.
To solve, you can use...
static char ss[255];
// or
char *ss = (char *)calloc(1,255);
// or with C++
char *ss = new char[255];
or so on...
You decide the trade-off. With a static variable, every call to get() could change the contents of the buffer. But with an approach involving allocation, your caller needs to free the memory and know whether to use free() or delete. Some approach the problem by supplying the buffer to the function when called, like...
void get(char *buf, int limit);
// or
void get(char *buf, int& limitActual);
Then main thing is that when dealing with strings, in C/C++ (even std::string) you are dealing with memory that has to be managed somehow. With string, be very careful with automatic variables.