char num [] = pow(2,4);

char num [] = pow(2,4);


how to save whole number to char array ? (16) so that menas char num [] = "16";

but it must be in this form :

char num [] = pow(2,4);
but it must be in this form :
It is impossible.
Best you can do:
1
2
char num[16]; //Buffer of sufficient size
sprintf("%d", int(pow(2,4)) )
i used cout <<pow(2,1000) and now i want to be able to read its value its very very long number it must be possible to be readed one by one also digits , i didnot save pow (2,1000) to any variable so i just want to do smth like string number = pow (2,1000); and string will have value of this huge number if char array cant do this
get a bignum library
http://www.cplusplus.com/doc/tutorial/variables/ (Fundamental data types)
Topic archived. No new replies allowed.