[Dev-C++] access violation, error in code ?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <h.r...@gm...> - 2002-07-25 23:09:52
|
Hi all,
I always get a access violation ( access at 0x00000000) at the first getline
command in the following codesnip. Has someone a explanition for this ?
Thanks in advance.
greetings
Horst
codesnip:
[...]
bool isLine2Skip(const string& s) {
return ( (s[0] == ';') || // Comment
(s[0] == ' ') || // Space
s.empty() ); // Empty String
} // bool isLine2Skip
bool ReadDataFile(const string& s)
{
try {
ifstream in(s.c_str());
if (!in) throw ERR_FILE_OPEN;
string line;
do {
getline(in, line);
} while (isLine2Skip(line));
pf.MeanS = atof(line.c_str());
[...]
--
Horst Rößner
Postf. 1802
52205 Stolberg
ICQ ID #74808448
h.r...@gm...
h.g...@t-...
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
|