It's used to access members (variables or functions) of an object that a pointer is pointing to.
1 2 3 4 5 6 7
std::string str = "ABC";
std::string* ptr = &str;
// Different ways of printing the first character of the string.
std::cout << str.front() << std::endl;
std::cout << ptr->front() << std::endl;
std::cout << (*ptr).front() << std::endl;