以下は文字列データを書き込むために機能しますが、書き込むには double および float データが必要です。
どうすればいいですか?
bool WriteOutputValue( tstring strValue)
{
FILE* pOutputFile = NULL;
// Open file
//_tfopen_s(&pOutputFile, _T("Subtract.txt"), _T("w, ccs=UNICODE") );
_tfopen_s(&pOutputFile, _T("GetBalanceTimeReport.txt"), _T("w") );
if (NULL == pOutputFile)
{
printf("error Output file\n");
return false;
}
int nRet = _fputts( strValue.c_str(), pOutputFile);
if (nRet < 0)
{
printf("error writing GetBalanceTimeReport\n");
fclose(pOutputFile);
return false;
}
fclose(pOutputFile);
return true;
}