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

C / C++ / MFC

 
GeneralRe: Static library with MFC support Pin
Richard MacCutchan16-Aug-13 1:33
mveRichard MacCutchan16-Aug-13 1:33 
GeneralRe: Static library with MFC support Pin
Erudite_Eric16-Aug-13 22:57
Erudite_Eric16-Aug-13 22:57 
GeneralRe: Static library with MFC support Pin
Richard MacCutchan16-Aug-13 23:11
mveRichard MacCutchan16-Aug-13 23:11 
AnswerRe: Static library with MFC support SOLVED Pin
Vaclav_17-Aug-13 3:11
Vaclav_17-Aug-13 3:11 
QuestionA template question Pin
EQ Learner13-Aug-13 9:50
EQ Learner13-Aug-13 9:50 
AnswerRe: A template question Pin
pasztorpisti13-Aug-13 12:22
pasztorpisti13-Aug-13 12:22 
GeneralRe: A template question Pin
EQ Learner14-Aug-13 4:08
EQ Learner14-Aug-13 4:08 
GeneralRe: A template question Pin
pasztorpisti14-Aug-13 5:21
pasztorpisti14-Aug-13 5:21 
The fallback sfinae method (void Serialize(T& obj, ...)) is for that case. You can put there a compile error (I did that) but you can put there a default handler code too as an alternative for the case when the struct/class doesn't have a Serialize() method.

I almost forget to mention: When you have to handle primitive types (int, bool, ...) and structs/classes together then it can usually be done by calling an overloaded function/method that has overloads for the primitive types and a template method for the rest (structs/classes). In the template method you can do different kind of magic with the type it is called with, you can call one of its methods, sfinae,... When creating the overload for primitive types there is one strange thing to be aware of: char, signed char, and unsigned char are 3 different types and you need 3 overloads!
GeneralRe: A template question Pin
EQ Learner14-Aug-13 5:55
EQ Learner14-Aug-13 5:55 
GeneralRe: A template question Pin
pasztorpisti14-Aug-13 6:03
pasztorpisti14-Aug-13 6:03 
GeneralRe: A template question Pin
EQ Learner14-Aug-13 6:13
EQ Learner14-Aug-13 6:13 
GeneralRe: A template question Pin
pasztorpisti14-Aug-13 8:29
pasztorpisti14-Aug-13 8:29 
GeneralRe: A template question Pin
EQ Learner14-Aug-13 8:57
EQ Learner14-Aug-13 8:57 
GeneralRe: A template question Pin
pasztorpisti14-Aug-13 9:29
pasztorpisti14-Aug-13 9:29 
Questionhow can i improve my c programming in different ways Pin
Member 985748713-Aug-13 2:18
Member 985748713-Aug-13 2:18 
AnswerRe: how can i improve my c programming in different ways Pin
NotPolitcallyCorrect13-Aug-13 2:29
NotPolitcallyCorrect13-Aug-13 2:29 
AnswerRe: how can i improve my c programming in different ways Pin
CPallini13-Aug-13 2:32
mveCPallini13-Aug-13 2:32 
JokeRe: how can i improve my c programming in different ways Pin
pasztorpisti13-Aug-13 3:29
pasztorpisti13-Aug-13 3:29 
AnswerRe: how can i improve my c programming in different ways Pin
pasztorpisti13-Aug-13 3:15
pasztorpisti13-Aug-13 3:15 
GeneralRe: how can i improve my c programming in different ways Pin
Erudite_Eric13-Aug-13 4:33
Erudite_Eric13-Aug-13 4:33 
GeneralRe: how can i improve my c programming in different ways Pin
CPallini13-Aug-13 9:17
mveCPallini13-Aug-13 9:17 
GeneralRe: how can i improve my c programming in different ways Pin
pasztorpisti13-Aug-13 9:22
pasztorpisti13-Aug-13 9:22 
AnswerRe: how can i improve my c programming in different ways Pin
Erudite_Eric13-Aug-13 4:35
Erudite_Eric13-Aug-13 4:35 
GeneralRe: how can i improve my c programming in different ways Pin
CPallini13-Aug-13 9:18
mveCPallini13-Aug-13 9:18 
AnswerRe: how can i improve my c programming in different ways Pin
jschell13-Aug-13 8:46
jschell13-Aug-13 8:46 

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.