Are C pointer arrays such as char *myArray[10] equivalent to pointer to pointers? Pointer arrays in general? myArray would be a pointer with 10 elements to other char pointers? Same would be true for any type?
Are C pointer arrays such as char *myArray[10] equivalent to pointer to pointers? Pointer arrays in general? myArray would be a pointer with 10 elements to other char pointers? Same would be true for any type?
Arrays (whether of pointers or otherwise) are not pointers, but are converted to a pointer to their first element when passed as an argument or used in some other context where a pointer is expected.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
http://c-faq.com/aryptr/index.html
Especially 6.3
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Thank you both for your answer, this seems to be cleared up now.