Here's my code as of latest:
#include <stdio.h>
#include <math.h>
int main() {
if ((printf("%d",p ow(2,128))==0)
{ fprintf (stderr,"0 error");
return -1;
}
return 0;
}
I realize there is also a C99 exp2 ( ) function that would do the same
thing. I originally had this.
#include <stdio.h>
#include <math.h>
int main() {
printf("%d",pow (2,128));
return 0;
}
I have tried to add an error routine to the first code. This is going to be
a big number but i'm looking to write 128 bit strings and or numbers that
are unique like MS's clsids and GUIDs. First I need to get a decimal value.
Oh yes is there any way I can cast a hex number in printf to get a hex
instead of pow ( ) 's double type.
Bill
I hope this is clear.
#include <stdio.h>
#include <math.h>
int main() {
if ((printf("%d",p ow(2,128))==0)
{ fprintf (stderr,"0 error");
return -1;
}
return 0;
}
I realize there is also a C99 exp2 ( ) function that would do the same
thing. I originally had this.
#include <stdio.h>
#include <math.h>
int main() {
printf("%d",pow (2,128));
return 0;
}
I have tried to add an error routine to the first code. This is going to be
a big number but i'm looking to write 128 bit strings and or numbers that
are unique like MS's clsids and GUIDs. First I need to get a decimal value.
Oh yes is there any way I can cast a hex number in printf to get a hex
instead of pow ( ) 's double type.
Bill
I hope this is clear.
Comment