if(!cfileEditText.Open("222.txt", CFile::modeCreate | CFile::modeWrite| CFile::modeNoTruncate))
return;
for (int p = 1; p <=16; p++)
{
str.Format("%10.6f\n", cepp[p]);
cfileEditText.Write(str, str.GetLength)
cfileEditText.SeekToEnd();
}
以上程序是我把求得的参数存放到一个文件222.txt中,但是我怎么从文件中把float 型数据取出,然后对其进行操作呢?请教各位高手!!
return;
for (int p = 1; p <=16; p++)
{
str.Format("%10.6f\n", cepp[p]);
cfileEditText.Write(str, str.GetLength)
cfileEditText.SeekToEnd();
}
以上程序是我把求得的参数存放到一个文件222.txt中,但是我怎么从文件中把float 型数据取出,然后对其进行操作呢?请教各位高手!!
cfileEditText.Open( "222.txt" , CFile::modeRead );
cfileEditText.SeekToBegin( );
for ( p = 1; p <=16; p++)
{
cfileEditText.Read( szTemp , 11 );
cepp[i] = atof( szTemp );
}
cfileEditText.Close( );
::WritePrivateProfileString("1","new key 1","202.193","c:\\222.ini");
Sleep(100);
::GetPrivateProfileString("1","new key 1",NULL,buf,32,"c:\\222.ini");
float fNum=atof(buf);