C++ String at()
This function is used for accessing individual characters.
Consider a string str. To find the position of a particular character, its syntax would be
pos : It defines the position of the character within the string.
It returns the character specified at that position.
String contains Welcome to javatpoint tutorial
Example shows that we can access the characters by using either the member function at() or the subscript operator[ ].