Hey Everyone,
Currently, I am working on a base converter that converts a binary to decimal or decimal to binary or binary to hex. However, for this I need to read the string or the number from the text file and convert it to a hex or binary or octal.
For example
int number,
fin>>number
//number = 101111001
//after reading i need to somehow get it into this form.
int a [x] = {1 0 1 1 1 1 0 0 1}
I need to separate this number into an array so i can do arithmetic on this. so I need it to be saved as int a [x] = {1 0 1 1 1 1 0 0 1}