【標準C++】C++相談室 part39【STL含む】
■ このスレッドは過去ログ倉庫に格納されています
0261デフォルトの名無しさん
05/01/30 11:00:14なぜか特定のバイトを読み飛ばして出力してしまうのです。
いかにソースを書きます(Borland C++ Builderにてコンパイル)
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
void main(){
ifstream in("bb.swf");
ofstream out("out.txt");
char c;int index = 0;
while(in >> c){
if(index == 16){out << endl;index = 0;}
index ++;
stringstream dusts;
dusts << hex;
dusts.width(2);
dusts << static_cast<int>(static_cast<unsigned char>(c)) << " ";
out << dusts.str() ;
}
in.close();
}
そのような仕様でもあるのでしょうか
■ このスレッドは過去ログ倉庫に格納されています