This question arose: I needed to create an array of strings, and I decided to implement it using an array of pointers.
char **strArr; the problem is that the number of the lines themselves = the number of elements of this array I find out only after the work of a certain function. For example, suppose the quantity is contained in the variable count . Then:
func(&count); // функция, которая возвратит мне значение count strArr = new char *[count]; and here when compiling the program, the compiler begins to curse, they say, an undeclared identifier. Tell me what am I doing wrong? Or, if my approach is not very rational, tell me an example of another structure, with the help of which I could implement storing strings.