Accessing private Member
-
Hi everyone, i need to access a private Member of a friend class from a derived class LOL Class A with private Member AA Class B has a Member of kind pointer on class A So B can't access AA. Using the friend function friend class A, the class B can access AA All these classes are in a component, so i can't modify the source code. Now i derive the class B and call these class for example MyB In MyB i must also use the Pointer to the class A with his private Member. But then i get the error : C2248 I added also the friend class A to MyB. Anyone an idea? Big thanks
-
Hi everyone, i need to access a private Member of a friend class from a derived class LOL Class A with private Member AA Class B has a Member of kind pointer on class A So B can't access AA. Using the friend function friend class A, the class B can access AA All these classes are in a component, so i can't modify the source code. Now i derive the class B and call these class for example MyB In MyB i must also use the Pointer to the class A with his private Member. But then i get the error : C2248 I added also the friend class A to MyB. Anyone an idea? Big thanks
C2248 isnt an error. Can you plz tell what is the error??
We Believe in Excellence www.aqueelmirza.cjb.net
-
Hi everyone, i need to access a private Member of a friend class from a derived class LOL Class A with private Member AA Class B has a Member of kind pointer on class A So B can't access AA. Using the friend function friend class A, the class B can access AA All these classes are in a component, so i can't modify the source code. Now i derive the class B and call these class for example MyB In MyB i must also use the Pointer to the class A with his private Member. But then i get the error : C2248 I added also the friend class A to MyB. Anyone an idea? Big thanks
C2248 = members of a derived class cannot access private members of a base class. That's all, if you cannot modify the source, then it can't be done, at least not without monumental hacking.
-
C2248 = members of a derived class cannot access private members of a base class. That's all, if you cannot modify the source, then it can't be done, at least not without monumental hacking.
Oh thanks Christian. I am working with Visual C++ since 4 years and now i have been informed that C2248 is an error code. :sigh:
We Believe in Excellence www.aqueelmirza.cjb.net
-
Oh thanks Christian. I am working with Visual C++ since 4 years and now i have been informed that C2248 is an error code. :sigh:
We Believe in Excellence www.aqueelmirza.cjb.net
Hi Aqueel, you have two sorts of errors: Compile Errors, which produces during the compilation, they start always with C and an ID Then you habe Linkage-Errors, they start with LNK and an ID Thanks Christian, so it's totally the problem of the Component-Support to resolve the problem :) Thanks anyway
-
Hi Aqueel, you have two sorts of errors: Compile Errors, which produces during the compilation, they start always with C and an ID Then you habe Linkage-Errors, they start with LNK and an ID Thanks Christian, so it's totally the problem of the Component-Support to resolve the problem :) Thanks anyway
Hi Baerten Thank you. That's great to know.
We Believe in Excellence www.aqueelmirza.cjb.net
-
C2248 isnt an error. Can you plz tell what is the error??
We Believe in Excellence www.aqueelmirza.cjb.net
Aqueel wrote:
C2248 isnt an error.
Sure it is.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb