Help needed! - Confused by char **
-
Hello, I'm fairly new to C++. I have come a cross a definition in the form: void SetChoices(char ** ppszItemsText, UINT nNumItems); If I understand char ** correctly it is a pointer to a string pointer. I'm trying to set up a list of strings that will fit into char **. Can anyone help me? All my attempts fail terribly. THanks Karl
-
Hello, I'm fairly new to C++. I have come a cross a definition in the form: void SetChoices(char ** ppszItemsText, UINT nNumItems); If I understand char ** correctly it is a pointer to a string pointer. I'm trying to set up a list of strings that will fit into char **. Can anyone help me? All my attempts fail terribly. THanks Karl
well karl i think so your are confused with the pointers it is a very small concept of rows and columns:-O do the following steps firstly define a char ** for ex. char ** a; then allocate the memory which you needed for ex. a = new char[10]; i.e. firstly allocate the number of rows i.e. how many strings you want to store then allocate the memory for what will be the size of each string for ex. for (int i=0; i < 50; i++) a[i] = new char[50]; i.e. allocate the memory for each columns ok so simple try it out and mail me back hope so this will solve your problem i m a student of M. Sc. Computer Science from khopoli wanna any information regarding the VC++ and VB ? specialization on Message Digest Security