[過去ログ] DXライブラリ 総合スレッド その19 [無断転載禁止]©2ch.net (1002レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
476
(6): 2018/09/07(金)17:09 ID:stA8I9vh(1/2) AAS
良く分からんけど、こんな感じの事がしたいの?
void LoadData( int t_Width, int t_Height, std::string t_FileName )
{
int t_FileHandle = FileRead_open( t_FileName.c_str() );
int t_FileSize = FileRead_size( t_FileName.c_str() );
std::vector< std::vector< int > > t_MapDataVec;
int t_LoadNum = 0;
char t_Char;

//マップの配列を確保
t_MapDataVec.resize( t_Height );
for( int i = 0; i < t_Height; i++ )
{
t_MapDataVec[ i ].resize( t_Width );
}

//正常に1文字を読み込める間、繰り返す
while( ( t_Char = FileRead_getc( t_FileHandle ) ) != -1 ){
if( isdigit( t_Char ) != 0 ){
int t_Sum = 0;
do{
t_Sum = ( t_Sum * 10 ) + ( t_Char - '0' );
t_Char = FileRead_getc( t_FileHandle );
}while( isdigit( t_Char ) != 0 );

t_MapDataVec[ t_LoadNum / t_Width ][ t_LoadNum % t_Width ] = t_Sum;
++t_LoadNum;
}
}
FileRead_close( t_FileHandle );
}
1-
あと 526 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.008s