mirror of
https://github.com/nolongeractivemp3/shipthatcode-c.git
synced 2026-11-24 10:45:12 +01:00
lesson 12 fixed
This commit is contained in:
1 parent
59abd98f10
commit
317cef8452
1 file changed
+1
-1
@@ -66,7 +66,7 @@ int main(void) {
|
|||||||
line in it as <number>:<text> (numbered from 1, no newline inside
|
line in it as <number>:<text> (numbered from 1, no newline inside
|
||||||
the text), close it, then print the total as below. */
|
the text), close it, then print the total as below. */
|
||||||
int total = 0;
|
int total = 0;
|
||||||
char buf[128];
|
char buf[LINE_SIZE];
|
||||||
FILE *r = fopen(path, "r"); /* w NOT closed yet */
|
FILE *r = fopen(path, "r"); /* w NOT closed yet */
|
||||||
while (fgets(buf, sizeof buf, r) != NULL) {
|
while (fgets(buf, sizeof buf, r) != NULL) {
|
||||||
total ++;
|
total ++;
|
||||||
|
|||||||
Reference in new issue
Block a user