I'm using the proposed solution by @Martin for csv parsing with C++, as I'm trying to avoid using libraries like boost and such for my current project. I've placed his implementation in a "csv.h" header and am trying to include it with some other files. I keep getting the following error
multiple definition of operator>>(std::basic_istream<char, std::char_traits<char> >&, CSVRow&)
when I try to build the project - I'm assuming this happens because the redefinition of operator>>
clashes with the original one. How can I make these two play nice? thanks.
Chances are you have the same operator included in multiple compilation units (ie cpp files) so you're getting the same code generated, the linker than looks at all the .obj files to pull them together and sees multiples.
You have 3 choices:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With