friend
Reciprocal friend member functions = circular include declarations
I have two classes defined in different h files and each class has some private functions. However, there\'s one function in each class that I want to be able to access from a function in the other cl[详细]
2023-03-09 18:57 分类:问答recursive friend classes
Is there any way around this: class B; class C { public: C() { } private: int i; friend B::B(); }; class B {[详细]
2023-03-08 18:05 分类:问答Simple design choice?
Say I have a class with a private data member n and a public get_n() function. When ov开发者_开发问答erloading the output operator for example, I can either use get_n() or make it a friend and use n.[详细]
2023-03-08 02:46 分类:问答Does "friend"ing a class extend to classes declared within that class?
I have the following code where class A declares class B as friend. Should class C, declared within class B, be able to view private declarations/members of class A?[详细]
2023-03-05 03:13 分类:问答esms.cpp:234: error: 'the_config' was not declared in this scope
I\'m trying to compile some .cpp files from an old open source project that no longer has a support community. There are about 15 .cpp files in the project and several of them use a one common file ca[详细]
2023-03-03 20:48 分类:问答public friend function in C++?
I saw some code in C++ and have a question about it: class CRectangle { int width, height; public: friend CRectangle duplicate (CRectangle);[详细]
2023-03-03 19:44 分类:问答will this OO win32API example work with multiple windows?
i\'m mainly focused on how this example uses wndproc as friend... im a little confused how it works and im just trying to figure out if and how this would wor开发者_开发知识库k with more than one wind[详细]
2023-03-02 19:58 分类:问答"Public \ Friend" vs "Friend \ Friend"
I\'ve been reading about access modifiers in VB.Net lately, and there is something that I can\'t really unders开发者_高级运维tand: How do elements in a Class (or Module) inherit the modifiers of their[详细]
2023-02-28 12:33 分类:问答How to Edit/Access Private Parts of Windows Forms with external class? [in project]
I\'m Working with Windows Forms (c++) and running into a bit of trouble :/ I have the Windows Form managed code where i do all the \'visual\'[详细]
2023-02-28 07:07 分类:问答public friend swap member function
In the beautiful answer to the copy-and-swap-idiom there is a piece of code I need a bit of help: class dumb_array[详细]
2023-02-27 03:06 分类:问答