Click here to Skip to main content
15,909,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDebug Assertion failure in AFXWIN2.inl Pin
JJeffrey15-Dec-08 22:09
JJeffrey15-Dec-08 22:09 
AnswerRe: Debug Assertion failure in AFXWIN2.inl Pin
CPallini15-Dec-08 22:14
mveCPallini15-Dec-08 22:14 
GeneralRe: Debug Assertion failure in AFXWIN2.inl Pin
JJeffrey16-Dec-08 13:28
JJeffrey16-Dec-08 13:28 
GeneralRe: Debug Assertion failure in AFXWIN2.inl Pin
CPallini16-Dec-08 21:40
mveCPallini16-Dec-08 21:40 
Questioncan i get demo for COM and OLE controls? Pin
puppya15-Dec-08 21:48
puppya15-Dec-08 21:48 
AnswerRe: can i get demo for COM and OLE controls? Pin
CPallini15-Dec-08 22:09
mveCPallini15-Dec-08 22:09 
QuestionC++ Class Template Full and Partial Specialization query Pin
ComplexLifeForm15-Dec-08 21:47
ComplexLifeForm15-Dec-08 21:47 
AnswerRe: C++ Class Template Full and Partial Specialization query Pin
Stuart Dootson15-Dec-08 22:08
professionalStuart Dootson15-Dec-08 22:08 
#include <iostream>

template<typename T>
class PrintUserData
{
public:
   template<typename T1, typename T2>
   bool PrintData (T1 const& t1, T2 const& t2)
   {
       std::cout << "Template" << std::endl;
       return true;
   }
   template<class T2>
   bool PrintData<int, int>(int const& t1, T2 const& t2)
   {
       std::cout << "Partially specialised Template" << std::endl;
       return true;
   }
   bool PrintData(float const& t1, float const& t2)
   {
       std::cout << "Function Overload" << std::endl;
       return true;
   }
};

struct MyClass {};

template<>
class PrintUserData<MyClass>
{
public:
   template<typename T1, typename T2>
   bool PrintData (T1 const& t1, T2 const& t2)
   {
       std::cout << "MyClass specialisation" << std::endl;
       return true;
   }
};

int main(int, char**)
{
   PrintUserData<int> pudInt;
   pudInt.PrintData('a', 'a');
   const int a = 10;
   pudInt.PrintData(a, a);
   const float b = 10;
   pudInt.PrintData(b, b);

   PrintUserData<MyClass> pudMy;
   pudMy.PrintData('a', 'a');
}


HTH?
GeneralRe: C++ Class Template Full and Partial Specialization query Pin
ComplexLifeForm15-Dec-08 23:56
ComplexLifeForm15-Dec-08 23:56 
GeneralRe: C++ Class Template Full and Partial Specialization query Pin
Stuart Dootson16-Dec-08 3:30
professionalStuart Dootson16-Dec-08 3:30 
GeneralRe: C++ Class Template Full and Partial Specialization query Pin
ComplexLifeForm16-Dec-08 6:28
ComplexLifeForm16-Dec-08 6:28 
GeneralRe: C++ Class Template Full and Partial Specialization query Pin
Stuart Dootson16-Dec-08 7:30
professionalStuart Dootson16-Dec-08 7:30 
QuestionFont of afxmessage or messageBox Pin
tasumisra15-Dec-08 21:23
tasumisra15-Dec-08 21:23 
AnswerRe: Font of afxmessage or messageBox Pin
L. Madhavan15-Dec-08 22:39
L. Madhavan15-Dec-08 22:39 
GeneralRe: Font of afxmessage or messageBox Pin
tasumisra15-Dec-08 23:32
tasumisra15-Dec-08 23:32 
GeneralRe: Font of afxmessage or messageBox Pin
L. Madhavan15-Dec-08 23:54
L. Madhavan15-Dec-08 23:54 
GeneralRe: Font of afxmessage or messageBox Pin
tasumisra16-Dec-08 0:23
tasumisra16-Dec-08 0:23 
GeneralRe: Font of afxmessage or messageBox Pin
Iain Clarke, Warrior Programmer16-Dec-08 9:10
Iain Clarke, Warrior Programmer16-Dec-08 9:10 
Questionabout dlls in visual C ++ 6 and Visual C++ 2005 Pin
DSPCottage15-Dec-08 21:07
DSPCottage15-Dec-08 21:07 
AnswerRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
Naveen15-Dec-08 21:33
Naveen15-Dec-08 21:33 
GeneralRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
DSPCottage15-Dec-08 22:05
DSPCottage15-Dec-08 22:05 
GeneralRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
Naveen15-Dec-08 22:08
Naveen15-Dec-08 22:08 
GeneralRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
DSPCottage15-Dec-08 22:17
DSPCottage15-Dec-08 22:17 
GeneralRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
Eytukan16-Dec-08 6:39
Eytukan16-Dec-08 6:39 
AnswerRe: about dlls in visual C ++ 6 and Visual C++ 2005 Pin
Iain Clarke, Warrior Programmer16-Dec-08 9:12
Iain Clarke, Warrior Programmer16-Dec-08 9:12 

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.