2009-05-01から1ヶ月間の記事一覧

boost::bindが返してくるファンクタ

boost::bindが返してくるファンクタの引数を過剰に与えるといらない部分は無視されるらしい(というか過剰に渡しても普通に動く) #include <iostream> #include <string> #include <boost/bind.hpp> struct Functor { typedef void result_type; result_type operator()(std::string message){</boost/bind.hpp></string></iostream>…

google earthの産総研3Dモデル

つくば駅周辺をgoogle earthで見てたら珍しく3Dモデルのある建物があった。 どうやら産総研らしい。 なんていうか雑 ちなみに新宿の例 中途半端な事するならやらないほうがまし、なんてね!

仮想関数のアクセス指定子

C++

どうやらC++はオーバーライドする際にアクセス指定子を好きなように書き換え放題らしい 具体的には #include <iostream> class Base { public: virtual void func(){ std::cout << "Base" << std::endl; } }; class Deriverd : public Base { private: virtual void</iostream>…