I want to have a nonmember function to have access to the private members of a class. The class must declare that function a

a. friend
b. inline
c. static
d. None of the above nonmember functions cannot have the access described here.


a) If a class declares a functions to be a friend, it is granting access to the private members (it already has access to the public members.)

Computer Science & Information Technology

You might also like to view...

Is the following string a prefix expression? +–/ abc * + def *gh

What will be an ideal response?

Computer Science & Information Technology

_________ in a macro explain what the code should accomplish and should appear above the macro action

Fill in the blank(s) with correct word

Computer Science & Information Technology

Each of the whole numbers 1-20 are written separately on 20 ping-pong balls and placed in a hat. What is the probability that you will draw the number 14 on the first draw?

What will be an ideal response?

Computer Science & Information Technology

The overall effect of the Reduce Patchiness option on the Select menu is to smooth sharp corners and jagged lines, reducing patchiness. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology