A minimal library to parse and work with binary stored files in C++ (read and write lib)
With Rwlib you can write a list of datatypes (includes your own data types!) in binary mode to a file or read from a file.
Read and write (from/to classes and structs) easier than any time!
- Include rw.h to your cpp file
#include "rw.h"
- For example we have and struct like this:
struct Student {
char name[10];
int age;
int id;
};
- And we have a vector of Students:
vector<Student> list;
- Now create an object of RW:
RW rw("my_students.bin");
it will create a file with name "my_students.bin"
- Read and Write data with these two simple commands:
rw.parseToFile(list);
rw.parseToVec(list);
There is also an example: example
- Many Things!