Hi ..
What is wrong with this code ?
set<string> nk ;
bitset<3> bs1(string("100"));
nk.insert(bs1.to_string());
error: no matching function for call to `std::bitset<3u>::to_string()'
why?!
UPDATE :
Thansk , this works . But why does it work ? :D
Hi ..
What is wrong with this code ?
set<string> nk ;
bitset<3> bs1(string("100"));
nk.insert(bs1.to_string());
error: no matching function for call to `std::bitset<3u>::to_string()'
why?!
UPDATE :
Thansk , this works . But why does it work ? :D
Everything I said before is wrong. See here for an example how to use that function.
While checking Space_COwbOy's answer, I found another page that shows that to_string is a template function (with parameters similar to std::basic_string). I haven't tried this, so just check it out.