-
Quickie: typedef
Can you make it treat it explicitly, so that this:
Code:
typedef DWORD FLAG;
void funcx(FLAG flag1)
{
cout << "FLAG" << endl;
}
void funcx(DWORD int1)
{
cout << "INT" << endl;
}
int main(void)
{
FLAG x12;
DWORD x13;
funcx(x12);
funcx(x13);
return 0;
}
Will work, outputting "FLAG INT"?
I need this so that I can make it differenciate between a FLAG and a DWORD.
-
typedefs do not make a new type but rather just give an existing type a second name/alias.
So your example will not work properly. To do this you would need to use a class not a typedef.