I have the following function (from the lionet asn1 compiler API):
int xer_fprint(FILE *stream, struct asn_TYPE_descriptor_s *td, void *sptr);
The first paramter is a FILE*, and that is where the output goes.
This works:
xer_fprint(stdout, &asn_struct, obj);
and so does this:
FILE* f = fopen("test.xml", "w");
xer_fprint(f, &asn_struct, obj);
fclose(f);
But I need this data in a string (std::string preferably).
How do I do that?