Thank you!

It is solved.

El miércoles, 7 de noviembre de 2012 23:29:26 UTC+1, Jason Hsueh escribió:
>
> Use mutable_repomessage()->set_nodeid... - see the C++ tutorial an intro 
> to the generated accessors. 
> https://developers.google.com/protocol-buffers/docs/cpptutorial
>
>
> On Mon, Nov 5, 2012 at 1:59 AM, Javier Blesa Martínez 
> <hea...@gmail.com<javascript:>
> > wrote:
>
>> Hi,
>>
>> I have a protobuf definition:
>>
>> message CBMessage {
>>   
>>   required int32 type = 1; //defines the kind of message that we send
>>   optional RepoMessage repomessage = 2;
>>
>>   message RepoMessage { 
>>     optional int32 nodeid = 1;
>> }
>>
>> And I would like to change the nodeid inside the RepoMessage:
>>
>> CBTxMessages::CBMessage* cbmsg;
>> cbmsg = new CBTxMessages::CBMessage;
>>
>> this->cbmsg->repomessage().set_nodeid(message[0]);
>>
>>  but I have an error when compile:
>>
>> error: pasar ‘const CBTxMessages::CBMessage_RepoMessage’ como el 
>> argumento ‘this’ de ‘void 
>> CBTxMessages::CBMessage_RepoMessage::set_nodeid(google::protobuf::int32)’ 
>> descarta a los calificadores [-fpermissive]
>>  
>> I understand that the function repomessage() is const, and the problem is 
>> related with that, but how can I solved?
>>
>> Someone can help me, please?
>>
>> Best regards,
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/protobuf/-/BL2qdZLLfpcJ.
>> To post to this group, send email to prot...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> protobuf+u...@googlegroups.com <javascript:>.
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msg/protobuf/-/NklQGtBe0HwJ.
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.

Reply via email to