Thursday, November 29, 2012

Pointers in C++

int *p;

p is a pointer to an integer quantity

int *p[10];

p is a 10 elements array of pointers to integer quantities

int (*p)[10];

p is a pointer to a 10 element integer array

int *p(void);

p is a function that returns pointer to an integer quantity and accepts nothing

int p(char *a);
p is function that accepts an argument which is a pointer to a character  and returns an integer quantity
int *p(char *a);
p is a function which accepts an argument which is a pointer to a character and returns a pointer to an integer quantity

int (*p)(char *a);
p is a pointer to a function which accepts an argument as a pointer to a character and returns an integer quantity
int (*p(char *a))[10];
p is function that accepts argument which is pointer to a character and returns a pointer to a 10 element integer array
int p(char (*a)[]);
p is a function which accepts an argument which is a pointer to a character array and returns an integer quantity

int p(char *a[]);
p is a function which accepts an argument which is an array of pointers to characters and returns an integer quantity
int *p(char a[]);
p is a function which accepts a character array as argument and returns a pointer to an integer quantity
int *p(char (*a)[]);
p is function which accepts an argument which is a pointer to an array of characters and it returns a pointer to an integer quantity
int *p(char *a[]);
p is a function which accepts argument as an array of character pointers and returns a pointer to an integer quantity
int (*p)(char (*a)[]);
p is a pointer to a function which takes an argument which is a pointer to character array and  returns an integer quantity
int *(*p)(char (*a)[]);
p is a pointer to a function which takes argument which is pointer to a character array and returns a pointer to an integer quantity
int *(*p)(char *a[]);
p is a pointer to a function which takes argument which is an array of pointers to characters and returns pointer to an integer quantity
int (*p[10])(void);
p is a 10 element array of pointers to functions which does not take anything as argument and each function returns an integer quantity 

int (*p[10])(char a);
p is 10 element array of pointers to functions; each function accepts a character as argument; and each function returns an integer quantity

int *(*p[10])(char a);
p is a 10 element array of pointers to functions; each function takes a character as argument; and each function returns a pointer to an integer quantity
int *(*p[10])(char *a);
p is a 10 element array of pointers to functions; each function takes a character pointer as argument; and each function returns a pointer to an integer quantity








Saturday, November 24, 2012

Windows Driver Kit (WDK)/Windows Driver Development Kit(Win DDK)

Initially it was known as Windows Driver Development Kit, now it has been superseded by Windows Driver kit i.e. WDK.
As the name suggests it is a framework to develop drivers on Windows Platform.
You can either instal it directly from internet or you can download the file to install in another system
Here is the link

http://msdn.microsoft.com/en-us/library/windows/hardware/gg487428.aspx

I am installing WDK because I need to work on SORA which is a SDK to develop Software Radio applications. It has been developed by Microsoft Research Asia center.

To install WIN DDK you can follow this link 

http://www.tenouk.com/windowsddk/windowsdriverdevelopmentkit.html

Details are here

http://research.microsoft.com/en-us/projects/sora/