file_reader/examples/test.cpp
Luna ceb65deca8 changed project structure
Also made functions return result to know how the read went
Also made the file derserializer work more efficiently
2025-07-01 23:41:32 +02:00

18 lines
No EOL
368 B
C++

#include "../src/file_read.h"
#include <fcntl.h>
#include <unistd.h>
#include <print>
int main()
{
file_reader a("test.txt");
buffer t;
t.data = nullptr;
t.allocated = 0;
t.size = 10;
auto tup = std::make_tuple(t);
auto res = a.read_from_tuple(tup);
if (res.second == READ_CORRECT)
std::println("{}", std::get<0>(tup).data);
}