SORU
5 EKİM 2010, Salı


Kont bir dize tekrarı karakter

Nasıl "bla_bla_blabla_bla" gibi bir dize "_" Sayı sayabilir miyim?

CEVAP
6 EKİM 2010, ÇARŞAMBA


#include <algorithm>

std::string s = "a_b_c";
size_t n = std::count(s.begin(), s.end(), '_');

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Disney Pets and Animals

    Disney Pets

    29 ŞUBAT 2012
  • Matthew Smith

    Matthew Smit

    24 Mayıs 2010
  • The Fashion Sight

    The Fashion

    22 AĞUSTOS 2011