OK, I see the problem. data is a member function, so you have to call data(). And actually data() returns a const reference while mutable_data() returns a pointer for mutable access, so in your case where you are modifying the field, you have to call mutable_data().
On Wed, Jan 30, 2019 at 3:28 PM <[email protected]> wrote: > TransferData transferData; > > transferData.data.Reserve(3); > > > On Wednesday, January 30, 2019 at 2:35:58 PM UTC-8, > [email protected] wrote: >> >> I have a protobuf that contains a repeated field of repeated bytes as >> described below. It is my understanding that TransferData::data is >> essentially a list of vectors(arrays), correct? If so how does one go about >> setting the size of data and then populating each array? >> >> message TransferData >> >> { >> >> repeated bytes data = 1; >> >> } >> >> > This email and its contents are confidential. If you are not the intended > recipient, please do not disclose or use the information within this email > or its attachments. If you have received this email in error, please report > the error to the sender by return email and delete this communication from > your records. > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
