Character array implemented in C++ as a class project in college