linux - formatting output of booleans c++ -
i begginner @ programming in c++ , know if there way can change output of boolean variables low level graphics in terminal (linux). display example small circle true , small square false.
i needing display array of booleans in terms of small symbols such example above output project, suggestions on best way impliment function if have asked not possible?
you can print unicode symbols using std::wcout
. e.g. "\u2605"
print star.
so can write like
std::wcout<< (mybool) ? "\u2605" : "\u25cf" <<std::endl;
this print star if mybool
true
or circle if false
you can find many tables of unicode characters online, e.g. here: http://jrgraphix.net/r/unicode/
Comments
Post a Comment