wxpythonでギリシャ文字

#小文字
self.lbl1.SetLabel(u'\N{GREEK SMALL LETTER ALPHA}')
self.lbl2.SetLabel(u'\N{GREEK SMALL LETTER BETA}')
self.lbl3.SetLabel(u'\N{GREEK SMALL LETTER GAMMA}')
#大文字
self.lbl4.SetLabel(u'\N{GREEK CAPITAL LETTER ALPHA}')
self.lbl5.SetLabel(u'\N{GREEK CAPITAL LETTER BETA}')
self.lbl6.SetLabel(u'\N{GREEK CAPITAL LETTER GAMMA}')

http://osdir.com/ml/python.wxpython/2004-06/msg00587.html
http://tlt.its.psu.edu/suggestions/international/bylanguage/greekchart.html

いわゆるあれ

keyとvalueを持ち、keyでsortができるクラス、構造体

template < typename TYPE_A, typename TYPE_B>
class Class{
  public:
    TYPE_A key;
    TYPE_B value;
    Class(TYPE_A key, TYPE_B value)
    :key(key), value(value) {};
    bool operator< (const Class & right)const {
        return key < right.key;
    }
};

参考
http://www.hiramine.com/programming/c_cpp/operator.html

比較演算(「==」「!=」「<」「>」)

結論

bool CPoint3d::operator == ( const CPoint3d& b ) const;
bool CPoint3d::operator != ( const CPoint3d& b ) const;
bool CPoint3d::operator < ( const CPoint3d& b ) const;
bool CPoint3d::operator > ( const CPoint3d& b ) const;

考察(他の選択肢)

①戻り値の型を void にする。
void CPoint3d::operator == ( const CPoint3d& b ) const;
関数が仕事をしなくなる。
②戻り値の型に const をつける。
const bool CPoint3d::operator == ( const CPoint3d& b ) const;
constをつけても、つけなくても違いがない。


http://homepage2.nifty.com/well/const.html

メンバ関数 GetiSize() では、メンバ変数を読んでいるだけで、変更はしていないので const なオブジェクトで使われても問題ないように思われるのですが、コンパイラは GetiSize() がメンバ変数を変更しているかもしれないと判断し、コンパイルエラーとなってしまいます。そこで、これを避けるには、次のように、メンバ関数の定義に const キーワードをつけて、コンパイラに「この関数はメンバ変数を変更しない」ということを知らせるようにします。

なんでobjectがconstなのかは不明だが、比較演算子の戻り値には上
のようにconstを付けないとコンパイルできない。

stringstream

stringstreamと>>(右シフト演算子)を使うと文字列のsplitが簡単にできるようだ。
デフォルトは半角スペース?

stringstream ss("abc ist");
string a,b;
ss >> a; ss >> b;
cout<<a<<",  "<<b<<endl;

結果↓

abc,  ist

たぶんスペース以外でもできるのだろう。

http://ameblo.jp/nana-2007-july/entry-10037814047.html
http://wisdom.sakura.ne.jp/programming/cpp/cpp34.html
http://answers.yahoo.com/question/index?qid=20080725034648AAQSmvq
http://homepage2.nifty.com/well/sort.html
http://handasse.blogspot.com/2009/12/c-stl.html
http://codezine.jp/article/detail/6020
http://www.geocities.jp/ky_webid/cpp/library/025.html
http://homepage1.nifty.com/MADIA/vc/vc_bbs/200710/200710_07100040.html