備忘録2004/06/05
- http://astronomy.swin.edu.au/pulsar/
- system("PAUSE");でDOS窓開いたプログラムをPAUSEできるらしい。へぇへぇへぇ〜。http://d.hatena.ne.jp/studiokingyo/20040716#p1
- http://mix.sourceforge.jp/
今日はギャップバッファを調べた。
http://search.yahoo.co.jp/bin/query?p=%a5%ae%a5%e3%a5%c3%a5%d7%a5%d0%a5%c3%a5%d5%a5%a1&hc=0&hs=0
http://aiwww.main.eng.hokudai.ac.jp/~takty/
に掲載されているgapbuffer.hを元に
STL風味に味付けしてコーディングしています。
(TдT) アリガトウ gapbuffer.hの製作者様
C++による基底クラスで定義されたoperatorの呼び出し方
#include <vector>
#include <iostream>class hasei : public std::vector<int>{
public:
typedef std::vector<int> base_type;
hasei(){
}
void proc(){
base_type::push_back(1);
print();
base_type::operator[](0) = 2;
print();
}
void print()
{
//std::cout << base_type::operator[](0) << std::endl;
fprintf(stderr,"%d",base_type::operator[](0));
}
};
int main()
{
hasei print;print.proc();
return 0;
}
とりあえず、これで動くらしい。
へぇへぇへぇ〜。
ところで、Hatena管理者さん?
textareaタグ使いますと
が挿入されるのどうにか出来ます?