]
トップ «前の日記(2007-03-07) 最新 次の日記(2007-03-09)» 編集

Yukiharu YABUKI の tDiary



このtDiaryを検索します。

2007-03-08 [長年日記]

_ ORCAのシェアー躍進中。

日医のレセソフト「日レセ」が好調 2006年だけで8割増、1万件の導入達成前倒しも(http://medical.nikkeibp.co.jp/leaf/all/special/it/report/200703/502618.html) これまでは、ORCAに好意的な人が多く導入してきたが、これからは、いわゆる「ユーザ」さんがもっと導入することになるのだろう。

_ c++:boost:ptimeの最小の使い方。

Debian Etchでやってみると、下記のような手順になる。

aptitudeで、libboost-date-time-dev を入れる。
Selecting previously deselected package libboost-date-time1.33.1.
(Reading database ... 216418 files and directories currently installed.)
Unpacking libboost-date-time1.33.1 (from .../libboost-date-time1.33.1_1.33.1-10_i386.deb) ...
Selecting previously deselected package libboost-date-time-dev.
Unpacking libboost-date-time-dev (from .../libboost-date-time-dev_1.33.1-10_i386.deb) ...
Setting up libboost-date-time1.33.1 (1.33.1-10) ...
 
Setting up libboost-date-time-dev (1.33.1-10) ...

以下のサンプルを、お好みのエディタで作成。ファイル名は仮にtest-posix-time.cppとする。namespaceを定義してないので、タイプの量が多い。タイプの量を減らしたかったら、namespaceを定義すればよい。

#include <iostream>
#include <boost/date_time/posix_time/posix_time.hpp>
 
int main(void){
  boost::posix_time::ptime a(boost::posix_time::second_clock::local_time());
 
  std::cout << a << std::endl;
}
コンパイルは、
g++ test-posix-time.cpp -o test-posix-time
出力結果は
$ ./test-posix-time
2007-Mar-08 17:04:10
$ ./test-posix-time
2007-Mar-08 17:04:16

ptimeの詳細については、(http://boost.cppll.jp/HEAD/libs/date_time/doc/class_ptime.html)を見よ。

_ C++:初期化リスト

見慣れない形なので、どういう名前でぐぐったらいいのか、試行錯誤したが「初期化リスト」っていうらしい。(http://www.gcc.ne.jp/~narita/prog/advanced/02/index.html)