How would i write my function so that depending on what i passed to it it would act on it:
e.g.
char *KeyType(WPARAM keyID)
or
char *KeyType(int keyID)
without copying the whole function twice?
cheers
Andy
Printable View
How would i write my function so that depending on what i passed to it it would act on it:
e.g.
char *KeyType(WPARAM keyID)
or
char *KeyType(int keyID)
without copying the whole function twice?
cheers
Andy
You could write the KeyType( int ) like this
Code:char * KeyType( int nKeyID )
{
return( KeyType( (WPARAM) nKeyID ) );
}
You could use Templates. If you search the form you will find more info on them.