打开文件,然后读入一行到字符串str里面,循环读取行即可;参考例子如下:include <stdio.h> include <stdlib.h> / 1.txt 1,2,3,4,5,6,7 8,9,10,11,12,13,14 15,16,17,18,19,20,21 / int main (){ FILE *fp;int **a;//定义二维数组 int i,j;int row=0,column=0;//...