Ask coding questions

← Back to all posts
Adding text files to an array
JackTon

I'm currently working on a project that has a level generator which is based on getting access to multiple arrays of strings created via text files. Is there an effective way how to iterate through a folder and append its contents to data?

Comments
hotnewtop
Highwayman

c++17 std::filesystem standard header..?

Highwayman
Highwayman

so basically:

@Highwayman

JackTon

@Highwayman
Found out this project's using c++11, so I can't do that. You know any other file types like json or xml which can store multiple arrays of strings?

Highwayman

@JackTon not on c++11 repls, no.

Highwayman

actually, get a json or xml parser shouldn't be too bad- maybe try downloading a parser from gitHub with git clone or something. @JackTon