Click here to Skip to main content
15,917,968 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++ 2008 query Pin
Anthony Appleyard29-Nov-13 22:48
Anthony Appleyard29-Nov-13 22:48 
GeneralRe: Visual C++ 2008 query Pin
Jochen Arndt29-Nov-13 23:03
professionalJochen Arndt29-Nov-13 23:03 
GeneralRe: Visual C++ 2008 query Pin
Anthony Appleyard29-Nov-13 23:10
Anthony Appleyard29-Nov-13 23:10 
Questiondrawing butterfly network Pin
Member 1041597029-Nov-13 9:04
Member 1041597029-Nov-13 9:04 
AnswerRe: drawing butterfly network Pin
Richard Andrew x6429-Nov-13 15:01
professionalRichard Andrew x6429-Nov-13 15:01 
SuggestionRe: drawing butterfly network Pin
Richard MacCutchan29-Nov-13 22:37
mveRichard MacCutchan29-Nov-13 22:37 
QuestionCDialogbar's button tooltip can't show Pin
D.Manivelan29-Nov-13 2:16
D.Manivelan29-Nov-13 2:16 
SuggestionRe: CDialogbar's button tooltip can't show Pin
Richard MacCutchan29-Nov-13 6:07
mveRichard MacCutchan29-Nov-13 6:07 
QuestionMultiple dynamically created Spin Button Controls Pin
gokings27-Nov-13 11:37
gokings27-Nov-13 11:37 
AnswerRe: Multiple dynamically created Spin Button Controls Pin
Richard MacCutchan27-Nov-13 22:15
mveRichard MacCutchan27-Nov-13 22:15 
GeneralRe: Multiple dynamically created Spin Button Controls Pin
gokings28-Nov-13 7:08
gokings28-Nov-13 7:08 
QuestionCJBK_View::OnDraw(CDC* p_DC) Pin
BarryPearlman27-Nov-13 10:50
BarryPearlman27-Nov-13 10:50 
AnswerRe: CJBK_View::OnDraw(CDC* p_DC) Pin
Richard MacCutchan27-Nov-13 22:10
mveRichard MacCutchan27-Nov-13 22:10 
AnswerRe: CJBK_View::OnDraw(CDC* p_DC) Pin
BarryPearlman28-Nov-13 10:28
BarryPearlman28-Nov-13 10:28 
GeneralRe: CJBK_View::OnDraw(CDC* p_DC) Pin
Richard MacCutchan28-Nov-13 22:41
mveRichard MacCutchan28-Nov-13 22:41 
QuestionFriend Operators of Template Classes Pin
Skippums27-Nov-13 7:00
Skippums27-Nov-13 7:00 
AnswerRe: Friend Operators of Template Classes Pin
Freak3027-Nov-13 22:05
Freak3027-Nov-13 22:05 
GeneralRe: Friend Operators of Template Classes Pin
Skippums29-Nov-13 14:35
Skippums29-Nov-13 14:35 
AnswerRe: Friend Operators of Template Classes Pin
Stefan_Lang27-Nov-13 22:40
Stefan_Lang27-Nov-13 22:40 
Here's something that worked for me:
C++
template <class BaseType>
class iReadContainer
{
    template <class> friend bool operator== (const iReadContainer<BaseType>& one, const iReadContainer<BaseType>& other);
};


P.S.: In previous versions of VS this didnt work either. back then I used to declare a friend helper class in such cases, e. g. :
C++
template <class T>
class vec3 {
   T val[3];
public:
   ...
   friend class vec3_operator_helper; // no template argument required
};
class vec3_operator_helper {
public:
   template <class T> static
   vec3<T> add (const vec3<T>& v1, const vec3<T>& v2); // already befriended - just access vec3 members!
};
// operator declaration
template <class T>
vec3<T> operator+(const vec3<T>& v1, const vec3<T>& v2);
// operator implementation
template <class T>
vec3<T> operator+(const vec3<T>& v1, const vec3<T>& v2) {
   return vec3_operator_helper::add(v1, v2);
}

GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)


modified 28-Nov-13 5:49am.

GeneralRe: Friend Operators of Template Classes Pin
Skippums29-Nov-13 14:34
Skippums29-Nov-13 14:34 
GeneralRe: Friend Operators of Template Classes Pin
Stefan_Lang2-Dec-13 0:17
Stefan_Lang2-Dec-13 0:17 
QuestionFindFirstFile not working Pin
sachanratnesh26-Nov-13 18:58
sachanratnesh26-Nov-13 18:58 
AnswerRe: FindFirstFile not working Pin
Jochen Arndt26-Nov-13 20:59
professionalJochen Arndt26-Nov-13 20:59 
AnswerRe: FindFirstFile not working Pin
Richard MacCutchan26-Nov-13 22:59
mveRichard MacCutchan26-Nov-13 22:59 
AnswerRe: FindFirstFile not working Pin
Gisle Vanem26-Nov-13 23:50
Gisle Vanem26-Nov-13 23:50 

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.