actualmente no recuerdo los procesos en c++ y tengo la duda de como hacer leer dos matrices de un texto plano, ya posteriormente necesito hacer producto entre ellas.
int** leerMatriz(char *fileName) { FILE *fp = fopen(fileName, "r"); if (fp == NULL) { exit(EXIT_FAILURE); } char linea[80]; fgets(linea, 79, fp); char *token = strtok(linea," ");//10 6 char *compare = "-"; filas = atoi(token); token = strtok(NULL, " "); cols = atoi(token); int **matriz = new int*[filas]; for (int i = 0; i < filas; i++) { matriz[i] = new int[cols]; fgets(linea,79, fp); token = strtok(linea, " "); matriz[i][0] = atoi(token); for (int j = 1; j < cols; j++) { token = strtok(NULL, " "); matriz[i][j] = atoi(token); } }