标签: c++ string malloc memory-corruption
EDITED:发现导致此错误的其他代码部分:
void error(std::string str) { fprintf(stderr,"error: %s\n",str.c_str()); }
当我这样使用它时:
error("name " + id + " has already appeared");
我收到错误:
malloc(): memory corruption (fast): 0x00000000014c7310 ***