Raja
Raja

Reputation: 549

Usage of strings in protobuf-C

Iam new to use protobuf. Am using protobuf library in Linux-C.

Is there any example for setting optional and required string to my message?

Upvotes: 0

Views: 1612

Answers (1)

unwind
unwind

Reputation: 400049

The protobuf front page has an example of a .proto-file containing:

required string name = 2;
optional string email = 3;

So that doesn't seem to be very complicated. There doesn't seem to be an "official" C API on those pages, and you didn't provide a link to the one you're using so it's hard to say more.

Upvotes: 1

Related Questions