class string
{
char * ptr;
//...
size_t size(); // return number of chars (until null) in buffer pointed to by ptr
};
sizeof(message) == sizeof(string) == sizeof(ptr) == 4; // size of the struct
message.size() == number of characters in the message...