lundi 28 décembre 2015

Error in fstream reference

#ifdef __cplusplus
extern "C"
{
#endif
_DLL_EXPORT_
(
bool ,
OpenFile(std::fstream& fileStream )//line 294.17: 

)
{
    char fileName[] = "test.txt";
    fstream fs;      
    fs.open( fileName, std::fstream::out);
    fileStream = fs;
    return true;        

}
#ifdef __cplusplus
}
#endif

line 294.17: 1540-1118 (S) The declaration of "fs" uses the undefined class "std::basic_fstream<char,std::char_traits<char> >" when the class must be complete.

How do I fix this error?

Aucun commentaire:

Enregistrer un commentaire