void movieMod::ToggleDemoInfo_c( const idCmdArgs &args ) { if(!movie.active){ gameLocal.Printf( "This command is only available in demo playBack mode\n" ); return; } idStr fileName; fileName = "test.demoscan"; char tmp; idStr str; idFile* file = fileSystem->OpenFileRead( fileName.c_str() ); if ( file == NULL ) { gameLocal.Printf("error while reading the File\n"); return; } // read the file for(int i = 0; i<= 1024;i++){ file->ReadChar(tmp); str.Append(tmp); // append to our string } fileSystem->CloseFile(file); gameLocal.Printf(str.c_str()); // test }