Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

could I somehow pass a file object into this and have it read the contents of the file on this? #58

Closed
AraHaan opened this issue May 6, 2016 · 0 comments

Comments

@AraHaan
Copy link

AraHaan commented May 6, 2016

ifstream ifile;
int fsize;
char * inBuf;
ifile.open("res/test.json", ios_base::binary);
ifile.seekg(0, ios::end);
fsize = ifile.tellg();
ifile.seekg(0, ios::beg);
inBuf = new char[fsize];
ifile.read(inBuf, fsize);
string WINDOW_NAMES = (LPCSTR)ifile;
ifile.close();
int _json_data_ready = (int)WINDOW_NAMES;
Json my_json = Json::object{_json_data_ready};
while(looping == true) {
    for (auto s : Json::array(my_json)) {
        //code here.
    };
};

Note: this code might generate at least 4 errors and 1 warning also note I am fairly new at C++ but at least I know how file objects work somewhat in Python in Visual Basic.
Anyway I want to know if I could do soemthing like this? when the Json would look something like this

{"detectlist": ["Cheat Engine 6.1", "Cheat Engine 6.2", "Cheat Engine 6.3", "Cheat Engine 6.4", "Cheat Engine 6.5", "Cheat Engine 6.6", "Cheat Engine 6.7", "Cheat Engine 6.8", "Cheat Engine 6.9", "Cheat Engine 7.0", "OllyDBG", "PEiD v0.95"]}

Note the json will always change and as such I dont want to always change my DLL just because the json changes as what would the point of the json be?

@j4cbo j4cbo closed this as completed May 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants