On Mon, Nov 16, 2009 at 11:35 AM, JC-MAD-SP <public.cebal...@gmail.com>wrote:
> ConcreteMessage* concreteMessage = reinterpret_cast<ConcreteMessage*> > (mesage->New()); > This line is invalid. Here, *message is a DynamicMessage, and New() also returns a DynamicMessage, not a ConcreteMessage. DynamicMessage is a class which implements the Message interface to look like any arbitrary descriptor. This allows you to represent types which are not compiled into the binary at all. If you want to construct instances of compiled-in types from their descriptors, you want to use MessageFactory::generated_factory(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@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 -~----------~----~----~----~------~----~------~--~---