1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00
libkernaux/examples/memory_file.c

17 lines
346 B
C
Raw Normal View History

2022-06-27 10:46:29 -04:00
#include <kernaux/memory_file.h>
#include <assert.h>
#include <string.h>
static char buffer[4096];
void example_main()
{
struct KernAux_MemoryFile memory_file =
KernAux_MemoryFile_create(buffer, sizeof(buffer), NULL);
KernAux_File_puts(&memory_file.file, "Hello, World!");
assert(strcmp(buffer, "Hello, World!") == 0);
}