Vijay Samuel's Blog

Archive for June 2010

I recently refactored the drizzle client and came to know the importance of the program_options::notify(). Initially I was including this notify() blindly without knowing what it does but it turns out that it is very important when you use variable that make references to your variables map.
For instance, if you have an option like
(“foo”, po::value<string>(&opt_foo)->default_value(“”), “An option named foo”)

After your command line has been parsed, the notify does the job of assigning the argument of –foo to opt_foo.

I didn’t know this and spent hours together trying to find out why my variables weren’t getting the values coming in via the command-line. 🙂 Now that I ‘ve found out the importance of notify() I have one less bug to worry about in the future. 🙂 🙂

Advertisements

My Timeline

June 2010
M T W T F S S
« May   Jul »
 123456
78910111213
14151617181920
21222324252627
282930  

I, Me and Myself

My Blog Stats

  • 6,462 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4 other followers