nataudleung9811 nataudleung9811
  • 23-07-2019
  • Computers and Technology
contestada

Class members are accessed via the ____(1)_____ operator in conjunction with the name of an object of the class, or via the ___(2)_____ operator in conjunction with a pointer to an object of the class.

Respuesta :

SaniShahbaz
SaniShahbaz SaniShahbaz
  • 27-07-2019

Answer:

1.ClassName and . operator

2. ClassName and [] operator

Explanation:

There are two ways to get the members of a class first one is by using dot(.) operator.

Example : with assumption that person is a class object and age is the member in it we can use it as:

person.age

Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.

Example : person["age"]

Answer Link

Otras preguntas

Rylan is calculating the standard deviation of a data set that has 9 values. He determines that the sum of the squared deviations is 316. What is the standard
what is the value of the numberical expression 5/8 - 5/12 (3 - 1/4) + 2/3? please show work
Pls HELP me on this I'm not good at it (QS 14)
How is Vietnam war different than other wars?
Fill in the answer that completes the square. Then write the trinomial in factored form. X^2-14x+?
The sum of two numbers is 55. The larger number is 17 more than the other number. What is the value of the larger number? (Let the numbers be x and y)
is a caterpillar turning into a butterfly is or is not a metamorphosis
50% of 70 is the same as 15% of what number? Please show an equation and all work!
Help As an advocate of "modern Republicanism," Dwight Eisenhower took the position that the reforms of the New Deal were needed to
Name the kind or kinds of symmetry the following figure has: A