0

Hi ,
I am trying to use XDR to encode an integer variable.
I am trying to use xdr_int function xdr_int(&xdrs, &i); But to use this function I have to set XDR_ENCODE somewhere. I am unable to go about how to do this.
How should I proceed?

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by Salem
0

Hi,
The 2 functions which use XDR_ENCODE are
xdrmem_create and xdrstdio_create
But I am unable to use them with xdr_int because xdrmem_create deals with a chunk of memory & xdrstdio_create deals with stdout.

0

Er, so where ARE you putting the result?

If it isn't to a block of memory, or to a file, what's the point?

0

Hi,
I am storing it to a variable & then writing that variable to a file in the later part of the code.
I cannot write it immediately to a file.
Is there no way to encode & store it in a variable?
Thanks for your time.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.