Skip to main content
deleted 313 characters in body
Source Link
user719662
user719662

ES: les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

EN: I have left you with a solution which works the best for me, in certain cases. Especially if one knows [the size of?] one dimension of the array. Very useful for an array of chars, for instance if we need an array of varying size of arrays of char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

ES: La clave son los parentesis en la declaracion del array.

EN: The key is the parentheses in the array declaration.

ES: les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

EN: I have left you with a solution which works the best for me, in certain cases. Especially if one knows [the size of?] one dimension of the array. Very useful for an array of chars, for instance if we need an array of varying size of arrays of char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

ES: La clave son los parentesis en la declaracion del array.

EN: The key is the parentheses in the array declaration.

I have left you with a solution which works the best for me, in certain cases. Especially if one knows [the size of?] one dimension of the array. Very useful for an array of chars, for instance if we need an array of varying size of arrays of char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

The key is the parentheses in the array declaration.

Translation into English. My grasp of Spanish is far from perfect, so feel free to edit or make suggestions.
Source Link

ES: les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

EN: I have left you with a solution which works the best for me, in certain cases. Especially if one knows [the size of?] one dimension of the array. Very useful for an array of chars, for instance if we need an array of varying size of arrays of char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

ES: La clave son los parentesis en la declaracion del array.

EN: The key is the parentheses in the array declaration.

les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

La clave son los parentesis en la declaracion del array.

ES: les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

EN: I have left you with a solution which works the best for me, in certain cases. Especially if one knows [the size of?] one dimension of the array. Very useful for an array of chars, for instance if we need an array of varying size of arrays of char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

ES: La clave son los parentesis en la declaracion del array.

EN: The key is the parentheses in the array declaration.

Source Link

les dejo una solución que para mi es mejor en algunos casos. En particular para se sabe una dimensión del array. Muy util para array de chars, por ejemplo si queremos un array de tamaño variable de arrays de char[20].

int  size = 1492;
char (*array)[20];

array = new char[size][20];
...
strcpy(array[5], "hola!");
...
delete [] array;

La clave son los parentesis en la declaracion del array.