Hi, I must tried to run an program in g++3.4.6, and it gives an wrong answer. This problem does not occur in g++ 2.95. I am using debian etch. Se the C++ code below: ////////////////////////////////////////////////////begin-code///////// #include<iostream> #include<string> using namespace std; int main(){ 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];} } for (int k=0; k<nn; k++){ for (int l=0; l<word.size(); l++){ cout << vector[k][l];} cout << endl; } return 0; } ////////////////////////////////////////////////////end-code////////////// As you can see, if you run the program and give any input, it gives you only the last input. But if you run with g++-2.95, there's no problem. Thanks.
*** This bug has been marked as a duplicate of 31735 ***