Table of Contents Previous topic Next topic
C++ COMPILER LIBRARY FUNCTIONS->String Class Functions->Member Functions->Element Access
#include <string>
const char& operator[](size_t pos) const
char& operator[](size_t pos)
If pos < size(), returns the data at position pos.
If pos == size(), returns '\0'
If pos > size(), the behavior is undefined.
const char& at(size_t n) const
char& at(size_t n)
If pos < size(), returns the data at position pos.
If pos >= size(), the behavior is undefined.