f = fopen("data.txt", "w");
fprintf(f, "%s", "This is a line");
f = fopen("data.txt", "r");
printf("%s", str); //will print out "This"
Please tell me how to insert a string into a file, then retrieve it.
Is there any way to tell computer where the starting point and ending point are?
Tell me how. Thanks so much!
ps: Is there any suggestion to create a database with fields(columns) and records(rows)?
I think I will use a function call replace_blank (or replace_whitespace) which replace a white space with an underlined score "_", then insert input string to data file. When retrieving string, "_" is replace by " ". Is there any way more efficient?
Sorry, I mean starting point and ending point of a string.
I've solved this problem.
----- Write out each row, and then write out an end-of-line
what is an end-of-line? I just know EOF = end-of-file.
Show me. Thanks!
I wanna know how to count total records of a database :)