我正在使用Claran语和Lino作为我的方案拟订平台。
在我的抽样申请中。 我想获得并确定一个海关组合档案的价值。 下面是我的议事档案的结构。
idlevalue=5
sleeping=1
现在,我的问题是,在我的申请中,我很难思考如何落实既定职能。
我计划查阅档案的所有内容。 然后确定点人的具体价值,然后改变价值。 然后将所有数据再次输入档案。
这似乎在混淆档案中树立了一种价值,远远没有达到。
请提出咨询意见。
我正在使用Claran语和Lino作为我的方案拟订平台。
在我的抽样申请中。 我想获得并确定一个海关组合档案的价值。 下面是我的议事档案的结构。
idlevalue=5
sleeping=1
现在,我的问题是,在我的申请中,我很难思考如何落实既定职能。
我计划查阅档案的所有内容。 然后确定点人的具体价值,然后改变价值。 然后将所有数据再次输入档案。
这似乎在混淆档案中树立了一种价值,远远没有达到。
请提出咨询意见。
https://stackoverflow.com/questions/147902/linux-configuration-file-libraries” SO。
设有图书馆,例如libconfig,为你处理这类问题。
EDIT:我删除了“登革处理作为数据库,了解你在概念上如何对待......”。 想法是,在编织物的顶端备有一份标本:
书写代码,将所有变量进行分类并读为记忆。 在保存汇号时,只是再次节省所有变数,而不是试图找到一个具体变数,只修改该具体变数的价值。
这样做是好的:
char *config_file_path = "/foo/bar.conf";
struct config {...} myconfig;
read_config(config_file_path, &myconfig);
// set a value
myconfig.somevalue = 5;
// When re-writing, routine simply over-writes the entire file.
write_config(config_file_path, &myconfig);
只有当用户拯救大火时,你才需要书写文件,因此,在你准备这样做时,它就是一个巨大的瓶颈。
Sure - 硬部分是,你想要替换的数据可能与你想要用的数据相差。
通常的解决办法,特别是简单简便的文件,是简单地从记忆中写出一个完整的新文件,其中载有
As per me obviously getting the data from a file is easier. For changing the values there is one easier solution that you have all the data in some structure and when you want to change some values change them in structure and then copy the whole structure back to file.
如果只有一个改动,而且你不愿意将全部数据重新写到档案中,那么,你只能通过阅读“申请”方式的档案来改变所需要的价值,并寻求你的名字价值,然后改变价值。 它比照再次提交的所有数据,而是更好地做你想要的。
For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...
最好、最小、最快、开放的来源、C/C++ 3d 提供方(在3ds max模型的支持下),而不是通用公平市价,
Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...
I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...
I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...
I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...
Is there anything other than DDD that will draw diagrams of my data structures like DDD does that runs on Linux? ddd is okay and runs, just kind of has an old klunky feeling to it, just wanted to ...
Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...