made examples/demos for vectors && files && lists | also fixed a bug with the vector and list size and popping, explained in the adjacent comment

This commit is contained in:
Odweta
2023-12-22 19:04:08 +01:00
parent 2f1c78ce52
commit b9c93116bc
9 changed files with 146 additions and 75 deletions
+21
View File
@@ -0,0 +1,21 @@
#include <odweta/file.h>
#include <stdio.h>
int main() {
printf("creating a file using 'fileInit(<filename>)' (returns a file_t*)\n");
file_t* f = fileInit("test.txt");
printf("printing the file contents\n\n");
filePrint(f);
printf("\nconvering the file contents into a string (char*)\n");
char* string = fileToString(f);
printf("\"%s\"\n", string);
// TODO -> writing, clearing
printf("if you are finished working with the file BEFORE the immediate end of the program, run 'fileCleanup(file_t*)', otherwise it is not strictly necessary\n");
fileCleanup(f);
return 0;
}
+6
View File
@@ -0,0 +1,6 @@
this !1@#%
is a big
mega such large
test
and