title: Different ways of calling functions C++
body: <p>I know this is a very basic question, but after a few google searches and clicking on multiple links, I still couldn't find an answer.</p>
  
  <p>My question is what is the difference between the " . " and the " -> " in function calling in C++ language? </p>
  
  <p>For example, I have a program with 2 different data structures.
  Semaphore aaa;
  List bbb;</p>
  
  <p>To use a function on semaphore, I have to do aaa.P();
  but on List, I have to do List->append(object);</p>
  
  <p>I don't quite understand why Semaphore uses .P() whereas List uses ->append() 
  when semaphore is just a data structure containing an integer and a list.</p>