hi,

just want to ask, is it possible to restrict friend acess to a single class member function only?

in other words, if class A grant class B friend access to class A member function, then class B can call that class A function.

*note: this is suppose to be a workaround to the inability (my own) to pass class member function pointers into another class.

thanks in advance!

hi,

just want to ask, is it possible to restrict friend acess to a single class member function only?

in other words, if class A grant class B friend access to class A member function, then class B can call that class A function.

*note: this is suppose to be a workaround to the inability (my own) to pass class member function pointers into another class.

thanks in advance!

nope. A friend class can access all the members of a class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.