strdel help
#1

hi. i cant get strdel to work in this way (or any other way :S):

0 is saved into a file and i want it to delete 0 and replace it with a different number
Код:
format(Loc, sizeof(Loc), "/PINFO/PWS0/%s.txt", PNAME);
File = fopen(Loc,io_append);
strdel(Loc,1,2);
format(string,sizeof(string),"1");
fwrite(File,string);
fclose(File);
for some reason it works except it saves 1 after 0 instead of deleting 0 and saving 1.
Reply
#2

Use dini.
Reply
#3

i already have dini. i shall read the info on the forums.
Reply
#4

i tried:
Код:
format(Loc, sizeof(Loc), "/PINFO/PWS0/%s.txt", PNAME);
File = fopen(Loc,io_append);
dini_Unset(Loc,"0");//USING DINI
format(string,sizeof(string),"1");
fwrite(File,string);
fclose(File);
still doesnt work
Reply
#5

What exactly are you trying to do anyway?
Reply
#6

i have a file with "0" (no ""s) saved in it. and i want to delete the 0 and save a 1. i can save it fine but when i try to delete the 0, it doesnt work. i tried with dini and strdel.
Reply
#7

well thanks for the help...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)