
1 Mar
2008
1 Mar
'08
8:20 p.m.
AMDG Olaf Peter wrote:
Hi,
the snipped attached counts the accourance of a specified character. Is there a simpler way using the boost libs? This solution looks quite overkill. It should be fast ;-)
If you only want one character the standard library is enough: std::count(str1.begin(), str1.end(), ' ') In Christ, Steven Watanabe