Binary to Ascii Text Conversion

I used this function outside of main to find the binary equivalent to
a ascii text character


bool* ChartoBin(int c) {
static bool binarr[8];
for (int i=0;i<8;i++){
binarr[i] = c%2;
c=c/2;
}
return binarr;
}

int main(){
bool *ptrBinRow;
ptrBinRow= ChartoBin(int(read[8]));
return 0;
}

How would I convert the binary back into the ascii text. Any suggestions or advice would be greatly appreciated.
newb16 from another forum showed me this:
if s is the number in binary format n is converted to
decimal format
1
2
3
cin>>s; 	 
unsigned long n = bitset<32> (s).to_ulong();
cout<<s<<" binary == "<<n<<" decimal "<<endl; 
Topic archived. No new replies allowed.