开发者

taking input in an array from a txt file

I am supposed to be reading data from a text file.The format is xyz 2/n abc 5 now is there a way to开发者_StackOverflow中文版 reading this data into two different arrays??


It depends on your choice of programming language/tools.

In general, you will need to look for a pattern to split up your text content into arrays. for example, "xyz 2/n abc 5" could be split using " "(whitespace) into a 1-D array as:

array["xyz","2/n","abc","5"]

in most modern programming languages.

Could you tell us more about your environment/situation?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜