H
Hayrola
I have two vaiable types, named A and B. These are of the same type,
int, but their values must be treated differently before printing. eg:
typedef int A;
typedef int B;
void func(A val)
{
VIPfunction(val);
std::cout << val << std::endl;
}
void func(B val)
{ //Error points to this line
std::cout << val << std::endl;
}
This gives me the following error: "function 'void func(A)' already
has a body"
Is there an easy way to solve this, or
is there another way to accomplish what i am trying to do?
int, but their values must be treated differently before printing. eg:
typedef int A;
typedef int B;
void func(A val)
{
VIPfunction(val);
std::cout << val << std::endl;
}
void func(B val)
{ //Error points to this line
std::cout << val << std::endl;
}
This gives me the following error: "function 'void func(A)' already
has a body"
Is there an easy way to solve this, or
is there another way to accomplish what i am trying to do?