Create Objects and Invoke Method
string s, t;
defines two object s and t belonging to the class string.
Data member is referenced by writing
s.x
and the method f is invoked by writing
s.f(arguments)
If ptr is a pointer to s, we use
s -> x or s -> f(arguments)
Previous slide
Next slide
Back to first slide
View graphic version