My program treats matrixes reading them from a file. Their size is given in the beginning of the file. How to allocate memory for the matrix?
For this you need to place your matrix not in the stack, but in a heap. To allocate memory for objects in the heap, use the operator new. You can allocate memory for the matrix by several blocks. To do this you need to allocate memory for an array of string pointers. Then for each pointer using the new operator allocate memory for the string. The syntax for using such a matrix is similar to the syntax of regular matrix:
Everything works, thank you (Operator and Expert) so much! I will bookmark this page for future reference. Excellent job on the comments to by the way, now I can study and understand what is happening for the future!