Switched to using c++ strings instead of char arrays. Got tired of the hassle even though it was mainly for a learning exercise