dimanche 2 août 2015

C++ 11 string array initialization runtime error: malloc

when i compile with gcc old standard it's ok, but when compile with gcc -std=C++11 i've got runtime error: malloc: * error for object 0x7fff50604aa0: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug Abort trap: 6

it's my simple code: int main(){ string header[total_fields]{}; // for old standard remove {} return 0; }

Aucun commentaire:

Enregistrer un commentaire