Click here to Skip to main content
14,270,795 members

C / C++ / MFC

 
QuestionRe: Binary Tree Recursion Problem Pin
David Crow30-Mar-15 9:27
memberDavid Crow30-Mar-15 9:27 
AnswerRe: Binary Tree Recursion Problem Pin
Member 1156724330-Mar-15 9:31
memberMember 1156724330-Mar-15 9:31 
AnswerRe: Binary Tree Recursion Problem Pin
David Crow30-Mar-15 9:47
memberDavid Crow30-Mar-15 9:47 
GeneralRe: Binary Tree Recursion Problem Pin
Member 1156724330-Mar-15 10:09
memberMember 1156724330-Mar-15 10:09 
QuestionCpu temperature to obtain the sample code in visual c/c++ . Pin
Dandy Smile29-Mar-15 9:57
memberDandy Smile29-Mar-15 9:57 
AnswerRe: Cpu temperature to obtain the sample code in visual c/c++ . Pin
Richard MacCutchan29-Mar-15 21:14
protectorRichard MacCutchan29-Mar-15 21:14 
GeneralRe: Cpu temperature to obtain the sample code in visual c/c++ . Pin
David Crow30-Mar-15 3:26
memberDavid Crow30-Mar-15 3:26 
QuestionNeed to declare a class ( defined in cpp file ) as friend Pin
Raj Abhishek27-Mar-15 0:59
memberRaj Abhishek27-Mar-15 0:59 
Hello,

I have a namespace and class defined inside a cpp file (say x.cpp ). I want to declare this class as 'friend' inside another header (say y.h), but the header won't recognize the namespace.

Now, when I put the namespace in another header (x.h) and include it in y.h, I get a re-definition error ( also in x.cpp ). I can't remove the namespace definition from x.cpp, since it has been put together by a framework for me, and I won't be able to use the framework otherwise.

Does this mean I can't declare this class as friend of any other class ?

Regards,
Raj Abhishek
AnswerRe: Need to declare a class ( defined in cpp file ) as friend Pin
Richard Andrew x6427-Mar-15 8:26
professionalRichard Andrew x6427-Mar-15 8:26 
AnswerRe: Need to declare a class ( defined in cpp file ) as friend Pin
Freak3030-Mar-15 1:14
memberFreak3030-Mar-15 1:14 
AnswerRe: Need to declare a class ( defined in cpp file ) as friend Pin
Stefan_Lang8-Apr-15 4:39
memberStefan_Lang8-Apr-15 4:39 
QuestionLinkage Problem in MSVC 2008 (wxWidget 3.0 Application) Pin
Member 1125835326-Mar-15 20:59
memberMember 1125835326-Mar-15 20:59 
AnswerRe: Linkage Problem Pin
Richard MacCutchan26-Mar-15 21:16
protectorRichard MacCutchan26-Mar-15 21:16 
GeneralRe: Linkage Problem Pin
Member 1125835326-Mar-15 23:26
memberMember 1125835326-Mar-15 23:26 
GeneralRe: Linkage Problem Pin
Jochen Arndt27-Mar-15 0:11
mveJochen Arndt27-Mar-15 0:11 
GeneralRe: Linkage Problem Pin
Member 1125835327-Mar-15 0:18
memberMember 1125835327-Mar-15 0:18 
GeneralRe: Linkage Problem Pin
Jochen Arndt27-Mar-15 0:30
mveJochen Arndt27-Mar-15 0:30 
GeneralRe: Linkage Problem Pin
Member 1125835327-Mar-15 1:50
memberMember 1125835327-Mar-15 1:50 
GeneralRe: Linkage Problem Pin
Jochen Arndt27-Mar-15 2:14
mveJochen Arndt27-Mar-15 2:14 
GeneralRe: Linkage Problem Pin
Member 1125835327-Mar-15 2:21
memberMember 1125835327-Mar-15 2:21 
GeneralRe: Linkage Problem Pin
Jochen Arndt27-Mar-15 2:46
mveJochen Arndt27-Mar-15 2:46 
GeneralRe: Linkage Problem Pin
Member 1125835327-Mar-15 3:07
memberMember 1125835327-Mar-15 3:07 
QuestionNeed to open an instance of excel in the same process as my main program. Pin
Raj Abhishek26-Mar-15 4:15
memberRaj Abhishek26-Mar-15 4:15 
AnswerRe: Need to open an instance of excel in the same process as my main program. Pin
Melqui Andrade31-Mar-15 2:10
memberMelqui Andrade31-Mar-15 2:10 
QuestionControls, variable and dialogs Pin
lor7526-Mar-15 1:10
memberlor7526-Mar-15 1:10 

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.