How does C++ handle function overloading in this case?
#include <iostream>
void func(int x)
{
std::cout << "integer";
}
void func(short x)
{
std::cout << "short";
}
int main(void)
{
func(3);
}
Output: integer
Why is that?
How does C++ handle function overloading in this case?
#include <iostream>
void func(int x)
{
std::cout << "integer";
}
void func(short x)
{
std::cout << "short";
}
int main(void)
{
func(3);
}
Output: integer
Why is that?