B
bakzam
#include<iostream>
struct zaman{
float p;
};
typedef int (*func)(zaman, int);
int main(){
func(-1); //Hmmm. what's this?
std::getchar();
return 0;
}
why is func(-1) working?
Actually, I found this (equivalent code) in DON BOX's book
--------------------
typedef HRESULT (*INTERFACE_FINDER) (void *pThis, DWORD dwData, REFIID
riid, void **ppv);
//pseudo-function to indicate entry is just an offset
#define ENTRY_IS_OFFSET INTERFACE_FINDER(-1)
struct zaman{
float p;
};
typedef int (*func)(zaman, int);
int main(){
func(-1); //Hmmm. what's this?
std::getchar();
return 0;
}
why is func(-1) working?
Actually, I found this (equivalent code) in DON BOX's book
--------------------
typedef HRESULT (*INTERFACE_FINDER) (void *pThis, DWORD dwData, REFIID
riid, void **ppv);
//pseudo-function to indicate entry is just an offset
#define ENTRY_IS_OFFSET INTERFACE_FINDER(-1)