I am just trying to get my head around various pointer concepts and I have the following code:
char** a = new char*; // assign first pointer to point to a char pointer
char b[10] = "bla bla";
*a = new char; //assign second pointer a block of memory. -> This looks wrong to me!!
(**a) = b[2];
So what is wrong with the second 'pointer' memory allocation? It runs and stuff, but it just feels wrong.
EDIT:
Thanks for clarifying this! I learnt something!