ansi C reference phần 3

Cuối ví dụ] Nếu lớp X được định nghĩa trong một phạm vi không gian tên Y lớp lồng nhau có thể được khai báo trong lớp X và sau đó được định nghĩa trong định nghĩa của lớp X hoặc sau đó được xác định trong một phạm vi không gian tên kèm theo định nghĩa của lớp X. | 21-12 Strings library DRAFT 28 April 1995 basic_string capacity 1 The member function reserve is a directive that informs a basic_string of a planned change in size so that it can manage the storage allocation accordingly. Effects After reserve capacity is greater or equal to the argument of reserve if reallocation happens and equal to the previous value of capacity otherwise. Reallocation happens at this point if and only if the current capacity is less than the argument of reserve . Complexity It does not change the size of the sequence and takes at most linear time in the size of the sequence. Notes Reallocation invalidates all the references pointers and iterators referring to the elements in the sequence. It is guaranteed that no reallocation takes place during the insertions that happen after reserve takes place till the time when the size of the string reaches the size specified by reserve . bool empty const Returns size 0. basic_string element access charT operator size_type pos const reference operator size_type pos Returns If pos size returns data pos . Otherwise if pos size the const version returns traits eos . Otherwise the behavior is undefined. Notes The reference returned by the non-const version is invalid after any subsequent call to c_str data or any non-const member function for the object. const_reference at size_type n const reference at size_type n Requires pos size Throws out_of_range if pos size . Returns operator pos . basic_string modifiers basic_string operator op basic_string charT traits Allocator operator const basic_string charT traits Allocator rhs Returns append rhs . basic_string charT traits Allocator operator const charT s Returns this basic_string charT traits Allocator s . Notes Uses traits length . basic_string charT traits Allocator operator charT c Returns this basic_string charT traits Allocator c . basic_string append DRAFT

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
13    135    1    30-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.