https://github.com/amiremohamadi/rw
A minimal library to parse and work with binary stored files in C++ (read and write lib)
https://github.com/amiremohamadi/rw
cplusplus cpp file parser read reader write
Last synced: about 1 year ago
JSON representation
A minimal library to parse and work with binary stored files in C++ (read and write lib)
- Host: GitHub
- URL: https://github.com/amiremohamadi/rw
- Owner: amiremohamadi
- License: gpl-3.0
- Created: 2019-01-19T12:54:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T13:16:34.000Z (over 7 years ago)
- Last Synced: 2025-04-23T22:03:05.431Z (about 1 year ago)
- Topics: cplusplus, cpp, file, parser, read, reader, write
- Language: C++
- Size: 18.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```c++
#include "rw.h"
```
* For example we have and struct like this:
```c++
struct Student {
char name[10];
int age;
int id;
};
```
* And we have a vector of Students:
```c++
vector list;
```
* Now create an object of RW:
```c++
RW rw("my_students.bin");
```
it will create a file with name "my_students.bin"
* Read and Write data with these two simple commands:
```c++
rw.parseToFile(list);
rw.parseToVec(list);
```
> There is also an example:
[example](https://github.com/amiremohamadi/rw/tree/master/example)
## ToDo
- [ ] Many Things!