0

I am attempting to load a structure using an istream. Is there a way an istream can read/ignore specific characters or can I enforce this somehow? This is currently what I have:

struct MyStruct
{
    unsigned int  identifier;
    float         value;
    float         bob1;    
    float         bob2;    

    std::istream& operator>>(std::istream& in, MyStruct& s)
    {
        in >> identifier >> value
           // Can I do this?
           >> '[' >> bob1 >> ',' >> bob2 >> ']';
    };
};
jiveturkey
  • 2,484
  • 1
  • 23
  • 41

0 Answers0