NULL Pointer

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by lmoreira on Wed Mar 30 02:27:34 MST 2011
Hi Guys,
I have defined a type of variable using typedef called MultiBuffer, then I created an array of MultiBuffers.
I have a function that returns a pointer to one of the positions of the array, i.e. a MultiBuffer, when there are no more Multibuffer available for use I would like to return a NULL pointer to signal that there are no more pointers available.
When I used this on Pelles C it worked fine but in LPCXpresso it says it is not defined. I get that, but is there a way of doing the same thing.
I know I can get around this by returning a flag instead that can be just an int but that will make the function a bit messier.
Best Regards