12
ddephor
6y

I had to implement an internal tool in C++ which parses a file and converts the content into another format.
It did take hundreds of lines of code to get it working, file handling and parsing data in C/C++ is terrible.

I'd rather done it with some scripting language, and additionally implemented it in python as a side-project (in less than an hour and < 20 lines of code, BTW) but it should be C++ "Because that is how we do it here".

At the end the tool was only used for a few weeks, because someone had an idea how to completely avoid the need for that converted data.

Comments
  • 2
    Converting from what to what?

    It would be interesting to know the speed differences between the two programs as well
  • 2
    Can confirm

    If you want to parse stuff/text: don't use C++, you'll end up wanting to commit suicide
  • 0
    @FelisPhasma Converting from a struct with constants used in a header file into a CSV-like format.

    Time wasn't an issue, as there were less than a thousand lines to convert, so it took just a few milliseconds anyway. And the tool would only be run every few weeks or so, nobody would have cared even if it had run a minute or two.
Add Comment