Giter VIP home page Giter VIP logo

binaryreaderwriter's Introduction

BinaryReaderWriter

바이너리 데이터로 파일을 읽고 쓰는 기능의 클래스. 별도의 라이브러리가 필요하지 않음.


#include "BinaryWriter.h"
#include "BinaryReader.h"

using namespace std;

int main(void)
{
	BinaryWriter output("save.dat");
	output.writeInt(123);
	output.writeFloat(2.5f);
	output.writeDouble(8.2f);
	output.writeString("TEST");
	output.writeShort(5);
	output.writeString("¿ì³¢³£");
	output.writeInt(8);
	output.close();

	BinaryReader input("save.dat");
	int v1 = input.readInt();
	float v2 = input.readFloat();
	double v3 = input.readDouble();
	string v4 = input.readString();
	short v5 = input.readShort();
	string v6 = input.readString();
	int v7 = input.readInt();
	input.clear();

	cout << v1 << v2 << v3 << v5 << v6 << v7 << endl;

	return 0;
}

binaryreaderwriter's People

Contributors

mynameisdabin avatar

Stargazers

Tang guoshun avatar SteamB23 avatar loldruger avatar yj.gaia avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.