I suppose you could write three individual wrappers. It's equivalent to what the template would produce (i.e. a bit of code bloat).
void myPrint(int x, int y, int toPrint) {
moveTo(x,y);
print(toPrint);
}
void myPrint(int x, int y, long toPrint) {
moveTo(x,y);
print(toPrint);
}
void myPrint(int x, int y, char *toPrint) {
moveTo(x,y);
print(toPrint);
}
I don't necessarily recommend this, since code-hiding macros are greatly frowned upon these days, but you could use a preprocessor macro as a template replacement.
#define DEFINE_MY_PRINT(Type) \
void myPrint(int x, int y, Type toPrint) { \
moveTo(x,y); \
print(toPrint); \
}
DEFINE_MY_PRINT(int)
DEFINE_MY_PRINT(long)
DEFINE_MY_PRINT(char *)