pRags is a pointer of type MyClass. Just as you can have pointers to primitive data types, for example. int ptr, you can also have pointers to objects and in this case pRags are represented. Now access to the participants object is done using the arrow operator (->), or you can use ".". and play "*" to access the values of the members of the object. Here the member is a variable inside MyClass. This way foo () will have a definition inside MyClass.
user349026
source
share