So this one sounds very easy but I am getting some strange behavior.
In my program there is the following code:
std::cout << "Would you like to generate a complexity graph or calculate global complexity? (graph/global)\n";
std::cin >> ans;
if (ans != "global") std::cout << ">>" << ans << "<<" << std::endl;
char ans; should be
char ans;, for
"global", you need one more
char for the terminating null character
You should use
std::string instead, to avoid such issues.