Two days ago I was asked to have a look at a nonworking piece of code, based on boost::program_options, which went like this: options_description desc(“Usage”); desc.add_options() (“host,h”, value<string>(), “The host.”) (“file,f”, value<string>(), “This is the file.”); (“mode,m”, value<string>(), “The mode.”); If you don’t recognise the syntax, know that add_options() method of options_description returns a builder object (options_description_easy_init), with an operator () taking three parameters, which …
Continue reading Funny bug #20150127A small digression from the main topic of this blog – dogs coding in C++ – to highlight a small portion of the ugliness in the MATLAB syntax. Let’s assign a variable: >> A = 2 A = 2 >> disp(A) 2 >> disp(eval(‘A’)) 2 Ok, so A equals eval(‘A’). What about: >> eval(‘B = 3’) B …
Continue reading Let’s talk about MATLAB…Can C++ be explained with simple words, like talking to my dog? No. Luckily, I don’t have a dog either.
Continue reading C++ explained to my dog