What it says is, that the passed shader code data (in your case &tmp) is cleared/or invalid. If you have a look into the stack overflow problem you see that his readfile function stores the data into a std::string somewhere on the way. Then he stores the pointer to the strings internal char string to a temporary pointer (two times ô.O) and returns it. The problem here is not the temporary pointer but the fact, that it is pointing to data that is managed by a temporary string which is destroyed at the end of the function.
So do a std::cout on tmp before the function call:
glShaderSource(_handle, 1, &tmp, NULL);
Another issue might be a missing zero termination character ( \0 ) at the end of your char array. If std::cout does print something, just add the /0 to your array.
Is tmp an array (char tmp) or a pointer (char *tmp)? If it’s an array, the above won’t work, and your compiler should have warned you about it (assuming that warnings are enabled). You’d need e.g.