字符串转换问题
怎么把字符串转换成2进制代码?例如吧A转换成1000100,要求对汉字也可以哦。而且是一大串字符转换。本人使用的是vc++6.0编译器。
程序代码: string::iterator iter = str.begin();
while (iter != str.end()) {
ch = *iter++;
for (int i = 0; i < 8; ++i)
cout << ((ch >> i) & 1);
}
这部分能不能给些注释?







