Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> C++

ฟังก์ชัน match_results::max_size() ใน C++ STL

ฟังก์ชัน match_results::max_size() ใน C++ STL คืนค่าจำนวนสมาชิกสูงสุดที่ match_results object สามารถจัดเก็บได้ใน Match Container

ฟังก์ชันนี้ไม่รับพารามิเตอร์

โค้ดตัวอย่าง

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main() {
    match_results<float*> m;
    cout << "max_size: " << m.max_size() << endl;
    return 0;
}

ที่นี่ m เป็นอ็อบเจกต์ของ match_results

ผลลัพธ์

max_size: 768614336404564650