I basically created a chain of pointers...Is there any purpose to having something like this? I saw in DirectX API there was a function that requires an address of a pointer so I made this to practice..What is the purpose of something like this..
You have become a three-star programmer. Good work.
Really, there is little to no point, especially in C++. The only time I think it might be useful is if you needed to take a two-dimensional array of polymorphic objects for some reason, though there are better ways of doing that too.
@giblit I was just having fun with creating the functions that accept the different types of pointers and returning them..
This is because I am studying DirectX API..and I see that there are functions that take in pointers to pointers and return them..So I wanted to create my own functions that do the same thing to get a better understanding of the syntax..
Now I know how it does it by why does it? What is the need for it?
Thanks for your input helios but I want to get a fundamental understanding of how and why the function is structured the way it is...Breaking it apart and understand how the swapChain is coded..Understanding fundamentally why it is a double pointer...the bits and bites if you will.
I want to find somewhere that explicitly tells me about this function and its parameters
Is it like creating an instance of a class kinda? Why can't i just use the pointer thats already there...why do I have to create a pointer to another pointer?
I knew that it was a out pointer but i just didn't know why...It was so simple ..
"The function must give an IDrawable pointer back to the caller. But the function's return value is already used for the error/success code. Therefore, the pointer must be returned through an argument to the function."