this is my code to convert characters into its decimal form...it is working and the next step is to convert the decimal form to its binary form...how can i do that....????
#include<iostream>
#include<conio.h>
using namespace std;
void input();
void process();
int main()
{
input();
system("PAUSE");
}
void input()
{
string msg;
cout<<"Enter message: ";
getline(cin, msg);
cout<<endl;
// convert character to binary
cout<<"CHAR"<<"\t"<<"\t"<<"DECIMAL"<<endl;
cout<<"----"<<"\t"<<"\t"<<"-------"<<endl;
for(int count=0;count<msg.size();count++)
{
cout<<msg[count]<<"\t"<<"="<<"\t"<<static_cast<int>(msg[count])<<endl;
}