pointertables and new
By using pointers to pointers.
For example:
But be aware that pointers to pointers can lead to quite confusing syntax sometimes. I advise you to use brackets whenever possible to know what you''re doing.
For example:
// Array of ten char*char** myCharPointerPointer = new char*[10];// Allocate the first char*myCharPointerPointer[0]= new char[100];
But be aware that pointers to pointers can lead to quite confusing syntax sometimes. I advise you to use brackets whenever possible to know what you''re doing.
quote:Original post by Wildfire
By using pointers to pointers.
For example:
// Array of ten char*char** myCharPointerPointer = new char*[10];// Allocate the first char*myCharPointerPointer[0]= new char[100];
But be aware that pointers to pointers can lead to quite confusing syntax sometimes. I advise you to use brackets whenever possible to know what you''re doing.
Thank you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement