SORU
12 Kasım 2008, ÇARŞAMBA


c STL set fark

C STL veri yapısı fark işletmeni batıyor?

CEVAP
12 Kasım 2008, ÇARŞAMBA


Evet var, <algorithm>": std::set_difference. Kullanımı:

#include <algorithm>
#include <set>
#include <iterator>
// ...
std::set<int> s1, s2;
// Fill in s1 and s2 with values
std::set<int> result;
std::set_difference(s1.begin(), s1.end(), s2.begin(), s2.end(),
    std::inserter(result, result.end()));

Sonunda, set result s1-s2 içerir.

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Blendtec

    Blendtec

    30 EKİM 2006
  • Elly

    Elly

    3 EKİM 2005
  • NCIX Tech Tips

    NCIX Tech Ti

    2 Ocak 2007