[英]Loading a .txt file into C and putting data into an array
So I need to load a .txt
file similar to what's written below, but could possibly be thousands long, then place them into a corresponding array.因此,我需要加载一个类似于下面所写的
.txt
文件,但可能长达数千,然后将它们放入相应的数组中。 I can load the file just fine, I'm just unsure how to select what line goes to what array.我可以很好地加载文件,我只是不确定如何选择哪一行进入什么数组。 (I should make it clear that the order after a command isn't consistent)
(我应该明确命令后的顺序不一致)
1
abd
324
1:is a command,
abd:is a name,
324:is an id
Any Help Would be Appreciated.任何帮助,将不胜感激。
A simple way is:一个简单的方法是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.