When Memory is Allocated to Class in C++? : 

    Class Sample
    {
      int a,b;
     public :
      int sum()
      {
        return (a+b);
      }
    };
    int main()
    {
      Sample sm;
    }

 I am beginner to C++ so please provide keep language of your answer simple so that I understand well .
Thanks in Advance :)