Make a parameter return a value

Please review my code to let me know what I'm doing wrong here.
I'm building a function that will return a specific value if the parameter is of a specific type.

This is the beginning of my .h file.
How would i proceed with assigning a specific return value for each parameter type?

i thought i could just put
int dataType(long double dataIn) = 1 but that doesn't work.

I've managed to compile and build my library I just need to figure out this one piece. Any help would be appreciaetd

1
2
3
4
5
6
7
8
9
10
11
12
13

int dataType(long double dataIn);
int dataType(double dataIn);
int dataType(float dataIn);
int dataType(unsigned long int dataIn);
int dataType(long int dataIn);
int dataType(unsigned int dataIn);
int dataType(int dataIn);
int dataType(unsigned short int dtaaIn);
int dataType(short int dataIn);
int dataType(unsigned char);
int dataType(char);
that's kind of an interesting idea.

1
2
3
int dataType(long double dataIn) { return 1; }
int dataType(double dataIn){ return 2; }
// etc 
Topic archived. No new replies allowed.