Skip to content

A minimal library to parse and work with binary stored files in C++ (read and write lib)

License

Notifications You must be signed in to change notification settings

amiremohamadi/rw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RW

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!

How to use

  • 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

ToDo

  • Many Things!

About

A minimal library to parse and work with binary stored files in C++ (read and write lib)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages