Your array is too sort, you have forgotten the null character.
Also you can't do array assignments this in C++, only in C. Use one of: strcpy (see man strcpy), char pointer instead of statically 27 characters or C++/STL string class
BTW: when pasting code and referring to line numbers, please pipe it through nl.
|