tags:

views:

17

answers:

1
A: 

When you're reading the YAML:

std::string key, value;
it.first() >> key;
it.second() >> value; // ***
if (key.compare("my_queue") == 0) {
  *it >> my_queue;
}

The marked line tries to read the value of the key/value pair as a scalar (std::string); that's why it tells you that it's an invalid scalar. Instead, you want:

std::string key, value;
it.first() >> key;
if (key.compare("my_queue") == 0) {
  it.second() >> my_queue;
} else {
  // ...
  // for example: it.second() >> value;
}
Jesse Beder
I thought I was being dense! Of course, I'm sending it to the string before I try and call my operator. *blush*Thanks Jesse!
Robert Boehne