What kind of object do you want to store the string in? And like Ganado asks, what is "ErrorMessage"? A class, a struct or some kind of variable?
Your little bit of code tells me nothing about "ErrorMessage" and that "errorState" is an object of "ErrorMessage".
The function definition tells me that "string", not the best choice of names here, is a C style character array which could make a difference on how you store the "string" into something else.
Oh, BTW most everything in C++ is considered an object. So when you say store the received message ( 'string' )to object I think of a class or a struct, but even a simple variable is considered an object.
Next time try to be more specific with your question and show code that better covers your question.