Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: long long with swprintf / Win32 [modified] Pin
Michel Godfroid25-Apr-10 8:51
Michel Godfroid25-Apr-10 8:51 
AnswerRe: long long with swprintf / Win32 Pin
Chris Losinger25-Apr-10 9:08
professionalChris Losinger25-Apr-10 9:08 
JokeRe: long long with swprintf / Win32 Pin
Michel Godfroid25-Apr-10 10:13
Michel Godfroid25-Apr-10 10:13 
GeneralRe: long long with swprintf / Win32 Pin
Chris Losinger25-Apr-10 13:42
professionalChris Losinger25-Apr-10 13:42 
AnswerRe: long long with swprintf / Win32 Pin
Richard MacCutchan25-Apr-10 11:21
mveRichard MacCutchan25-Apr-10 11:21 
GeneralRe: long long with swprintf / Win32 Pin
Fareed Rizkalla25-Apr-10 11:25
Fareed Rizkalla25-Apr-10 11:25 
GeneralRe: long long with swprintf / Win32 Pin
KingsGambit25-Apr-10 16:53
KingsGambit25-Apr-10 16:53 
QuestionImage change detection Pin
trungkiendt825-Apr-10 8:29
trungkiendt825-Apr-10 8:29 
AnswerRe: Image change detection Pin
Fareed Rizkalla25-Apr-10 8:40
Fareed Rizkalla25-Apr-10 8:40 
GeneralRe: Image change detection Pin
trungkiendt825-Apr-10 9:01
trungkiendt825-Apr-10 9:01 
AnswerRe: Image change detection Pin
Alan Balkany26-Apr-10 5:08
Alan Balkany26-Apr-10 5:08 
QuestionAll reports lead to the same thing. Pin
Frank Robertson25-Apr-10 7:17
Frank Robertson25-Apr-10 7:17 
AnswerRe: All reports lead to the same thing. Pin
Frank Robertson25-Apr-10 7:19
Frank Robertson25-Apr-10 7:19 
AnswerRe: All reports lead to the same thing. Pin
Luc Pattyn25-Apr-10 7:30
sitebuilderLuc Pattyn25-Apr-10 7:30 
GeneralRe: All reports lead to the same thing. Pin
Frank Robertson25-Apr-10 8:14
Frank Robertson25-Apr-10 8:14 
GeneralRe: All reports lead to the same thing. Pin
Luc Pattyn25-Apr-10 8:17
sitebuilderLuc Pattyn25-Apr-10 8:17 
AnswerRe: All reports lead to the same thing. Pin
Chris Losinger25-Apr-10 8:25
professionalChris Losinger25-Apr-10 8:25 
AnswerRe: All reports lead to the same thing. Pin
CPallini25-Apr-10 21:05
mveCPallini25-Apr-10 21:05 
QuestionTemplate: how to detect type Pin
428825-Apr-10 2:04
428825-Apr-10 2:04 
AnswerRe: Template: how to detect type Pin
Code-o-mat25-Apr-10 3:03
Code-o-mat25-Apr-10 3:03 
AnswerRe: Template: how to detect type Pin
Richard MacCutchan25-Apr-10 3:07
mveRichard MacCutchan25-Apr-10 3:07 
AnswerRe: Template: how to detect type Pin
Saurabh.Garg25-Apr-10 3:42
Saurabh.Garg25-Apr-10 3:42 
AnswerRe: Template: how to detect type Pin
«_Superman_»25-Apr-10 6:55
professional«_Superman_»25-Apr-10 6:55 
AnswerRe: Template: how to detect type Pin
Stuart Dootson25-Apr-10 13:04
professionalStuart Dootson25-Apr-10 13:04 
Function specialisation. Specialization if you're American.

Use the standard template case for the common code, specialisations for code specific to types. Like this:

#include <iostream>

template<class _Type>
void Fn(_Type const&)
{
   std::cout << "Generic..." << std::endl;
}

template<>
void Fn<int>(int const&)
{
   std::cout << "int specialisation" << std::endl;
}

int main()
{
   Fn('a');
   Fn(10);
}


The output you get is:

Generic...
int specialisation

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

CodeProject MVP for 2010 - who'd'a thunk it!

GeneralRe: Template: how to detect type Pin
428826-Apr-10 2:53
428826-Apr-10 2:53 

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.