2011-01-14から1日間の記事一覧

switch case に string を渡したい

C++

何か電波を受信したのでやってみました。 #include <iostream> #include <string> #include <boost/typeof/typeof.hpp> #define switch_(value) \ if( bool __flag__ = true ) \ for( BOOST_AUTO(__value__, value) ; __flag__ ; __flag__ = false ) #define case_(__case__) \ if( (!(__flag__ = !(__va</boost/typeof/typeof.hpp></string></iostream>…