typedef
this is probably a stupuid question, but i never understood typedef. if i have something like this
would that be the same as
whats the difference?
Code:
typedef a *b;
Code:
a * b;
typedef a *b;
a * b;
int Add(int x,int y)
{
return x+y;
}
typedef int (__cdecl* pAdd)(int,int); //__cdecl is C's usual calling convention
pAdd funcAdd = &Add
int main()
{
int number = funcAdd(5,5); //this is actually pointing to Add()
cout << number; //output is 10
}