------- Comment #1 from pcarlini at suse dot de 2007-04-28 19:15 ------- This code is illegal, compile it with -D_GLIBCXX_DEBUG and the run it and you will see. In a nutshell:
int n, nn; string vector[54], word; cin >> nn; for (int i=0; i<nn; i++){ cin >> word; for (int j=0; j<word.size(); j++){ vector[i][j] = word[j];} You are assigning to position j of string i of vector, but that string is still zero-sized at that point. -- pcarlini at suse dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31735