Or you could just do
Simple, short, yet concise and gets the work done.Code:for (unsigned int i = 0; i < valuesOfEnumerators_v_i.size(); i++) { try { EnumValue = EmumVec.at(i); if (! (EnumStream << EnumValue)) throw std::exception("Unable to parse input."); if (! (EnumStream >> EnumStr)) throw std::exception("Unable to extract input."); } catch (const std::exception& e) { std::cout << e.what() << "\nBits: eof: " << EnumStream.eof() << " bad: " << EnumStream.bad() << " fail: " << EnumStream.fail() << std::endl; } }
True, and you wasted lots of time yourself.The thing is, I didn't want to use my debugger. I wanted to waste my time putting out a lot of verbose, useless debug information, just so I could annoy you. And it worked...
But apparently you favor multiple posts when finding something new to add instead of merging them into one post.I use it all the time. That's why you see lots of posts with "Last edited by Programmer_P;"...
Maybe you should work on finding if it exists? The problem is that you double and triple post. A lot.I know there is a multi-quote button. But sometimes I forget about it. Anyway, I don't see what the big deal is. Why are you so into multi-quote buttons?
Such things are frowned upon. I guess it isn't long now until you're going to quadraple post.