Click here to Skip to main content
15,891,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About MFC Pin
khan++8-Jun-06 1:12
khan++8-Jun-06 1:12 
AnswerRe: About MFC Pin
Hamid_RT8-Jun-06 1:46
Hamid_RT8-Jun-06 1:46 
QuestionUser defined buttons on the MessageBoxes Pin
Taruni8-Jun-06 0:47
Taruni8-Jun-06 0:47 
AnswerRe: User defined buttons on the MessageBoxes Pin
khan++8-Jun-06 1:20
khan++8-Jun-06 1:20 
AnswerRe: User defined buttons on the MessageBoxes Pin
Viorel.8-Jun-06 1:29
Viorel.8-Jun-06 1:29 
AnswerRe: User defined buttons on the MessageBoxes Pin
Nishad S8-Jun-06 1:36
Nishad S8-Jun-06 1:36 
Questionabout friend function Pin
Aqueel8-Jun-06 0:43
Aqueel8-Jun-06 0:43 
AnswerRe: about friend function [modified] Pin
toxcct8-Jun-06 0:52
toxcct8-Jun-06 0:52 
Aqueel wrote:
Does it become friend function of that class


yes, that's why the friend keyword is made for.


Aqueel wrote:
it access private members of class?


no. friend functions/classes access at most protected members (and of course public ones), but not private.
yes...


Aqueel wrote:
If yes how i should define it in .cpp file of that class?


you declare it in the class which it is a friend of :
class CMyClass {
    //....
 
  public:
    friend ostream& operator << (ostream&, date&);
};

and then, define it in a .cpp (generally, in the .cpp which defines your class' members) :
ostream& CMyClass::operator << (ostream& os, date& d) {
    //...
    return os;
}




TOXCCT >>> GEII power

[VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

-- modified at 7:04 Thursday 8th June, 2006
GeneralRe: about friend function Pin
Sarath C8-Jun-06 1:01
Sarath C8-Jun-06 1:01 
GeneralRe: about friend function Pin
Cedric Moonen8-Jun-06 1:03
Cedric Moonen8-Jun-06 1:03 
GeneralRe: about friend function Pin
toxcct8-Jun-06 1:05
toxcct8-Jun-06 1:05 
GeneralRe: about friend function Pin
Sarath C8-Jun-06 1:08
Sarath C8-Jun-06 1:08 
GeneralRe: about friend function Pin
Sarath C8-Jun-06 1:10
Sarath C8-Jun-06 1:10 
GeneralRe: about friend function Pin
Cedric Moonen8-Jun-06 1:13
Cedric Moonen8-Jun-06 1:13 
GeneralRe: about friend function Pin
Sarath C8-Jun-06 1:17
Sarath C8-Jun-06 1:17 
GeneralRe: about friend function Pin
toxcct8-Jun-06 2:03
toxcct8-Jun-06 2:03 
GeneralRe: about friend function Pin
Aqueel8-Jun-06 1:04
Aqueel8-Jun-06 1:04 
GeneralRe: about friend function Pin
toxcct8-Jun-06 1:06
toxcct8-Jun-06 1:06 
GeneralRe: about friend function Pin
Aqueel8-Jun-06 1:11
Aqueel8-Jun-06 1:11 
GeneralRe: about friend function Pin
Cedric Moonen8-Jun-06 1:37
Cedric Moonen8-Jun-06 1:37 
GeneralRe: about friend function Pin
Cedric Moonen8-Jun-06 1:10
Cedric Moonen8-Jun-06 1:10 
GeneralRe: about friend function [modified] Pin
Cedric Moonen8-Jun-06 1:36
Cedric Moonen8-Jun-06 1:36 
QuestionHow to get POPUP on right click in ListCtrl [modified] Pin
Raja Bose C Leo8-Jun-06 0:42
Raja Bose C Leo8-Jun-06 0:42 
AnswerRe: How to get POPUP on right click in ListCtrl [modified] Pin
Sarath C8-Jun-06 0:49
Sarath C8-Jun-06 0:49 
GeneralRe: How to get POPUP on right click in ListCtrl [modified] Pin
Viorel.8-Jun-06 1:25
Viorel.8-Jun-06 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.