What is the difference between int** func() and int*& func(). Can you please explain it with suitable example.
Thanks,
Devesh.
What is the difference between int** func() and int*& func(). Can you please explain it with suitable example.
Thanks,
Devesh.
do you have linux installed. if yes try to use the cdecl utility
this is what i get
cdecl> explain int * *p()
declare p as function returning pointer to pointer to int
cdecl> explain int * &p()
Warning: Unsupported in C -- 'reference'
declare p as function returning reference to pointer to int
cdecl>
so int **func() is a function that returns a pointer to a pointer to int and int * & func() is a function that returns an reference to a pointer to a function, and as seen above the second statement is not supported in C, you can try it in c++ tho.