The following message appears when I tried your method. How can I do? thank
you.
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning
This file includes at least one deprecated or antiquated header which may
be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a
listing of replacement headers and interfaces, consult the file
backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
On Sunday, December 3, 2006 7:48:56 AM UTC+8, Wei Dai wrote:
>
> Use std::ostrstream and the << operator:
>
> #include <strstream>
>
> std::ostrstream oss;
> CryptoPP::Integer i("123");
> oss << i;
> oss << std::ios::hex << i; // use this for hex output
> std::string s(oss.str()); // output is now in s
>
> ----- Original Message -----
> Sent: Saturday, December 02, 2006 3:05 PM
> Subject: How can I convert Integer to string
>
>
> >
> > recently I find the crypto++ source code,I want to use ECP.
> > There is a question for me to resolve:
> > How to convert integer to string?
> > I find a message as this:
> > How to output a Integer as string(Decimal/Hex)? I just can do this:
> >
> > Integer plaintext;
> > byte* buffer=new byte[1024];
> > for (int i=0;i<plaintext.ByteCount();i++)
> > buffer[plaintext.ByteCount()-1-i]=plaintext.GetByte(i);
> > buffer[plaintext.ByteCount()]=0;
> > StringSource(buffer,plaintext.ByteCount(), true,
> > new HexEncoder(
> > new FileSink(cout)));
> > But not fit me,How can I do?
> > --
> > View this message in context:
> >
> http://www.nabble.com/How-can-I-convert-Integer-to-string-tf2742226.html#a7651065
> > Sent from the Crypto++ mailing list archive at Nabble.com.
> >
>
>
--
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.