Maybe this is a dumb question, but is there any way to convert a boolean value to a string such that 1 turns to \"true\" and 0 turns to \"false\"? I could just use an if st
Use boolalpha to print bool to string.
boolalpha
std::cout << std::boolalpha << b << endl; std::cout << std::noboolalpha << b << endl;
C++ Reference