aboutsummaryrefslogtreecommitdiff
path: root/tests/files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/files.cpp')
-rw-r--r--tests/files.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/files.cpp b/tests/files.cpp
index 1167bbdf..6283c4f1 100644
--- a/tests/files.cpp
+++ b/tests/files.cpp
@@ -76,6 +76,19 @@ int main()
fclose(other);
+ // fscanf
+
+ outf = fopen("fscan.f", "w");
+ fprintf(outf, "10 hello");
+ fclose(outf);
+
+ int number;
+ char text[100];
+ inf = fopen("fscan.f", "r");
+ num = fscanf(inf, "%d %s", &number, text);
+ fclose(inf);
+ printf("fscanfed: %d - %s\n", number, text);
+
return 0;
}