Uncategorized Archive

What are different ways to access members of objects in C++

After creating an object, we can access the data and functions using the dot operator as shown below: object-name.variable-name; (or) object-name.function-name(params-list);   Based on our student class example, we can access the get_details() function as shown below: std1.get_details(); std2.get_details();   The complete …

Like the article? please consider sharing it. Thank you

Advertisment ad adsense adlogger