Hey all, ive this function in a DirectX application:
void ReadBookmarkContent()
{
int i=0;
std::fstream fBookmarkInfo(books\\bookmarks.txt");
{
for(i=0;!fBookmarkInfo.eof();i++)
{
fBookmarkInfo.getline(cBookmarkInfo,200,'*'); //taking in the file contents
}
fBookmarkInfo.close();
}
}
Everything compiles correctly but when it comes to runtime i get this error:
Anyone got a idea why it happens? ive got a very similar function to this in another place that works fine. the character array is defined as:
char cBookmarkInfo[40][200];
Which is a global variable, Further info the error, it occurs here in istream:
_CATCH_IO_END
}
----> *_Str = _Elem(); // add terminating null character
_Myios::setstate(_Chcount == 0 ? _State | ios_base::failbit : _State);
return (*this);
}
And call stack says:
> msvcp80d.dll!std::basic_istream<char,std::char_traits<char> >::getline(char * _Str=0x0093c188, int _Count=200, char _Delim='*') Line 648 + 0x3 bytes C++
:O, thanks for your help
Chett
Chett - "I look forward to helping all of you one day, but right now im just a noob learning his way through the perils of game Development."