"An access violation (Segmentation Fault) raised in your program."
Posted
by
Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2011-01-01T18:42:52Z
Indexed on
2011/01/01
18:54 UTC
Read the original article
Hit count: 117
My C++ program compiles and works up until I call this function from main():
int uword(){fstream infile("numbers.txt");
fstream exfile("wordlist.txt");
string numb[numoflines];
string lines[numoflines];
number = 1;
line = 1;
for(int i=0;!infile.eof();++i)
{
getline (infile,number);
numb[i] = number;
getline (exfile,line);
lines[i] = line;
}
infile.close();
exfile.close();
string yourword;
Something here causes it to crash, in the debug it pops up with "An access violation (Segmentation Fault) raised in your program."
© Stack Overflow or respective owner