কম্পিউটার টিউটোরিয়াল

সি++ STL-এ মাল্টিসেট size() উদাহরণসহ (multiset size() in C++ STL with Examples)


এই টিউটোরিয়ালে, আমরা সি++ STL-এ মাল্টিসেট size() ফাংশন সম্পর্কে আলোচনা করব।

size() ফাংশনটি একটি কন্টেইনারে উপস্থিত এলিমেন্টের সংখ্যা রিটার্ন করে।

উদাহরণ

#include <bits/stdc++.h> using namespace std; int main(){    multiset<int> s;    s.insert(10);    s.insert(13);    cout << "The size of multiset: " << s.size();    s.insert(13);    s.insert(25);    cout << "\nThe size of multiset: " << s.size();    s.insert(24);    cout << "\nThe size of multiset: " << s.size();    return 0; }

আউটপুট

The size of multiset: 2 The size of multiset: 4 The size of multiset: 5

  1. C++ STL-এ list::size() ফাংশন

  2. C++ STL-এ forward_list::max_size()

  3. C++ STL-এ array::data() মেথড উদাহরণসহ

  4. C++ STL-এ multiset insert() ফাংশন ব্যবহার