You need to make some changes to your structure:
struct object {
std::string sent ;
struct nested {
void read ( object& obj ) { obj.sent = "FOO"; }
} bar;
};
-, read , nested object ( , , ), object ..
object foo;
foo.bar.read(foo);
EDIT: nested , object, ctor object, bar (*this), , , nested " ".