文件名称:read_txt
介绍说明--下载内容均来自于网络,请自行研究使用
本程序实现的功能是:
从一个txt为文本文档中,读入一个数字矩阵,例如,
在txt文档中写下如下的数据:
12 23 45 65
78 89 56 74
12 54 63 31
74 25 10 79
可以通过此程序读入到一个矩阵中(在程序中表现为存储在一个开辟好的存储空间中)。
在编程时要注意的一个问题在于:
txt文本文档在结束的时候有四个字符
space 空格符
CR
LF
EOF
所以在编程的时候要特别注意,否则极容易出现死循环而跳不出去。-Implementation of this program features are: a text from a txt document, read a digital matrix, for example, wrote in the txt document in the following data: 1,223,456,578,895,674 1,254,633,174,251,079 can Through this program read into a matrix (reflected in the program stored in a storage space to open up good). In the programming problem to note is that: txt text document at the end of the four characters space space character CR LF EOF so in programming time to pay special attention, otherwise very vulnerable to an infinite loop and able to dance to.
从一个txt为文本文档中,读入一个数字矩阵,例如,
在txt文档中写下如下的数据:
12 23 45 65
78 89 56 74
12 54 63 31
74 25 10 79
可以通过此程序读入到一个矩阵中(在程序中表现为存储在一个开辟好的存储空间中)。
在编程时要注意的一个问题在于:
txt文本文档在结束的时候有四个字符
space 空格符
CR
LF
EOF
所以在编程的时候要特别注意,否则极容易出现死循环而跳不出去。-Implementation of this program features are: a text from a txt document, read a digital matrix, for example, wrote in the txt document in the following data: 1,223,456,578,895,674 1,254,633,174,251,079 can Through this program read into a matrix (reflected in the program stored in a storage space to open up good). In the programming problem to note is that: txt text document at the end of the four characters space space character CR LF EOF so in programming time to pay special attention, otherwise very vulnerable to an infinite loop and able to dance to.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
read_txt\readtxt.c
........\程序说明.txt
read_txt
........\程序说明.txt
read_txt