Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   C query (http://www.go4expert.com/forums/c-query-t12758/)

kpnayak86 7Aug2008 13:04

C query
I have one simple query in C:

I have a file which has many name-value parameters like
path=(some path name)
Also there are some name-value parameters which are commented like
#section=some section

the problem is i want to check for these values which are NOT commented and display those which are missing in the file and leave the commented ones(hashed ones) just like that. these name-value parameters should be there in a file and hence are fixed in that file...

Wat i thought was to store the only name say prashanth in a char array and read the file line by line (using fgets) and get the name part from the file by delimiting it to '=' and compare it with the char array . If it returns 0 the update a int array which stores some values say 0 before , update it to 1 if the compare is 0.

Can u suggest any other way or correct me where i am wrong .
if code is given i would be greatful


shabbir 7Aug2008 14:40

Re: C query
You had the same thread in Introduction section with large fonts and I have deleted the thread. Please use font which are readable.

shabbir 7Aug2008 17:33

Re: C query
After warning also you did the same thing and you account is banned for 2 days now.

All times are GMT +5.5. The time now is 14:18.