The setters need a (non-const) pointer to the message object. It appears fractal_handle is a reference since the getter, which takes a const reference to a message, compiles.
On Fri, Aug 6, 2010 at 4:42 AM, mark.t.macdon...@googlemail.com < mark.t.macdon...@googlemail.com> wrote: > Can you please give me an example of using the reflection SetString > method? > > //this compiles > reflection->GetString(fractal_handle,fractal.GetDescriptor()- > >FindFieldByName("name")); > > //this doesn't > reflection->SetString(fractal_handle,fractal.GetDescriptor()- > >FindFieldByName("name"),"Mandlebrot"); > > Apologies if this is just poor C++ knowledge on my part. Many thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.