define a function with multiple types

hello, I have a function,
int teleport_to_game(int,float,float);
in my class. My question is should I change the int to define a function to a different type?

popa
popa6200 wrote:
My question is should I change the int to define a function to a different type?
I don't understand what you mean.
Every function is defined by it's name and types of arguments. So you can define
1
2
int teleport_to_game(int,float,float);
int teleport_to_game(float,float,float);

simultaneusly, because they are different functions.
But
1
2
int teleport_to_game(int,float,float);
float teleport_to_game(int,float,float);

will leads to error because compiler thinks that these are the same function.
Topic archived. No new replies allowed.