stl のベクトルクラスを使って再帰問題を回避。
stl 使うのは実はこれが初めてだが、うーん、確かにちょっとは便利かな?
何故今まで使ったことがなかったかといえば、その昔 C++ であるコードを開発しはじめた時はまだ stl なんてなかったから…。なにせシュトラウストラップの2版だったからなぁ。
あとで stl の名前を聞くようになって、調べかけたことはあったんだが sgi の実装がどーたらで、入手してきて gcc に組み込むのも面倒でそのまんま。
3版が出た頃にはほとんどコード弄らなくなってたしなぁ。
[referer:
The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run thisscript under CGIWrap debugging. Usually, either rename or linkthe script temporarily to a file which ends with .cgidextension, or add a AddHandler cgi-script-debug .cgiline to your .htaccess file.
]