<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Thanks Marc - exactly what I need. I was poking around the documentation for the C++ interface and did not see this. We use vector<char> for "historical" reasons, the rationale I'm not aware of.<br><font style="color: rgb(127, 0, 63);" size="3"><span style="font-style: italic;"></span></font><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> Bob<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: Marc Glisse <marc.glisse@normalesup.org><br>To: Robert Evans <bobsphysics@yahoo.com><br>Cc: gmp-discuss@swox.com<br>Sent: Wednesday, August 13, 2008 4:31:00 PM<br>Subject: Re: Construction From vector<char> ?<br><br>
On Wed, 13 Aug 2008, Robert Evans wrote:<br><br>> Sorry, I am not explaining myself well. What we have is not a vector<br>> containing the characters (i.e. ascii) representing a number, but the<br>> actual hex bytes. For example, we might have a 4 byte array containing<br>> [0x31 0x32 0x33 0x34]. For us this is NOT the number "1234" but the<br>> number 0x31323334 or in decimal 825373492. I supposed we should have<br>> used the name vector<unsigned short> but someone used vector<char> which<br>> is a bit misleading.<br><br>Wow ok. The most confusing thing is that the smallest the type you put in <br>vector, the slower the computations on that number will be. I just <br>couldn't believe that someone would use char there...<br><br>Then what you are looking for is most likely mpz_import/mpz_export.<br><br>-- <br>Marc Glisse<br></div></div></div><br>
</body></html>