Code Question
Posted in Code
First watch, 4 bells (10:21 pm)

Anybody know why I can't do this?

Given:

class Room {
  typedef boost::shared_ptr<Room> RoomPointer;
  typedef std::map<std::string, RoomPointer> RoomList;
 ...
}

And in another object, reference it like this:

RoomList mRoomList;
if((Room::RoomList::iterator it = mRoomList.find("name")) != mRoomList.end()) {
   return it->second;
}

I always get error: ‘::iterator’ has not been declared back from the compiler.

If I do this, it works fine:

Room::RoomList::iterator it = mRoomList.find("name");
if(it != mRoomList.end()) {
   return it->second;
}

I ask because Nicolai Josuttis (in The C++ Standard Library) recommends comparing the iterator against the end() condition on the same line because of type conversion of various unsigned types that may be used.

1 Comment »
Experimental Sourdough
Posted in Hobbies
First dog watch, 4 bells (6:00 pm)

I have two batches (three loaves) of sourdough to bake tonight. They're rising for the second time right now. I made them up yesterday, my starter (a Giza culture) is a slow riser. They look good, though. I like my normal recipe, but I'd like to try to find an even better recipe—this is the first experiment. I'm going to start baking in another hour or two. If I remember, I'll take some pictures!

Leave a Comment »
Witch Wanted
Posted in Strangeness
Forenoon watch, 8 bells (12:13 pm)

And while I'm writing about odd news, here's a story about a witch position open in Wookey Hole in the U.K..

I don't know about you, but having grown up watching Star Wars the words Wookey Hole conjure up some very...interesting...imagery. Now if they only spelled it Wookiee…

Leave a Comment »
Chinese Names
Posted in Strangeness
Forenoon watch, 8 bells (12:08 pm)

Go read this story about a girl called Chicken Dung.

So her parents named her after the act of rubbing her down with chicken poo, which, according to their "doctor," cured her. I think they just wanted to call her chicken dung and were looking for an excuse. Heck, that's what I'd do.

Leave a Comment »