|
|
|
|
Thomas Huxhorn wrote: |
---|
obviously ... printInstructionsAndGetInput() does two things. A function should do only one thing. openFiles() Does not open files. It iterate thou a directory. read and write files. readInputFile() what does this function do? Hmmmmm It parse a json file?! writeToOutputFile() yes ... write json as txt? void writeToOutputFile(std::string &outputEntryStr < This variable should be const. It should be called "fileName". The write function should not correct filename extension. The caller of the write() function should do this. Don't use string manipulation on filenames. We have the std::filesystem; for this task. You know of std::filesystem because you already used it. You forgot a const reference 1 2 for (std::string str : alphaNums) { for (const std::string& str : alphaNums) { There is no need for the {} part. 1 2 std::vector<std::string> alphaNums = {}; std::vector<std::string> alphaNums; And lot more. But no worry, you did a great job. I had no problems to read your code and understand what it does :) |