Error setting repeated fields in google protocol buffers
I have a message class:
message Foo {
repeated Foo2 field = 1;
}
//Foo2 is another message
and in my cpp file:
Foo* ci1;
Foo* ci2;
//call some function to to assign values to ci1->field(0)
function( ci1 )
//try to copy ci1-field(0) to ci2->field(0)
ci2->set_field( 0, ci1->field(0) );
But I get an error message: error: 'Foo' has no member named 'set_field'
Why is it reading set_field as a member instead of the function set_ the
member field? I'm new to protocol buffers so any help will be appreciated!
Thanks!
No comments:
Post a Comment