change "char pch[200000]" to "new char[200000]" (rebased)

Rebased version of #4236, changed to use begin_ptr from #4293. Also use vXXXX variable name syntax for the vectors...