开发者

taking input in an array from a txt file

开发者 https://www.devze.com 2023-02-14 03:01 出处:网络
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

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

精彩评论

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