previous | start | next

Final Revision

int main()
{
  Person pers1("Tod");

  const char *p = pers1.getName(); 

  // p[0] = 'R'; Can't change pers1.name by this trick
  
  cout << p << endl;

  return 0;
}
OUTPUT:
Tod


previous | start | next