glibc detected - double free or corruption
问题 I get the following error messages when I submit the code (pasted below) to an online gcc compiler. * glibc detected /run-1326102706-2046832693/solution: double free or corruption (!prev): 0x091901a8 ** ======= The code is as follows: # include <iostream> # include <string> # include <list> # include <cstring> using namespace std; int main() { int test_cases, i, score, str_len; string str; char first_char, current_char; list <int> strlist; list <int> :: iterator it; cin>>test_cases; char