fixed compile-time issue: added a cast to (char *) in delete[] statement;