top of page
altaybrusan

'stringstream' Quick Review

Updated: Aug 10, 2022





The following is way to convert bool to string









#include <sstream>
bool b = 10;
std::stringstream stringStream;
stringStream << std::boolalpha << b;
std::string str = stringStream.str();
std::cout << str.c_str();

or


 #include <string.h>
std::cout << std::to_string(b); 


0 views0 comments

Recent Posts

See All

smart pointers

The code we just described is fully functional, but, it can be strengthened, specifically with the function, AlbumDao::albums(). In this...

Commentaires


bottom of page