2008-11-24から1日間の記事一覧

Boost C++ Libraryのお勉強その5

連休中には終わらなそう…。 Boost.Date_Time 時間クラス色々。boost_date_timeをリンクする事。 #include <iostream> #include <boost/date_time.hpp> int main(void) { boost::gregorian::date d(2008,boost::gregorian::Nov,24); std::cout << boost::gregorian::to_simple_string(d) << s</boost/date_time.hpp></iostream>…

Boost C++ Libraryのお勉強その4

Boost.ConceptCheck テンプレート引数として渡したものがコンパイル出来ないものの場合、分かりずらいコンパイルエラーとなるので、わかりやすくするための仕組み。どうしてもコンパイル出来ずに断念…。 Boost.Config boost自体を構築するためのもの?マニュ…

Boost C++ Libraryのお勉強その3

Boost.CircularBuffer いわゆるリングバッファ。 #include <iostream> #include <boost/circular_buffer.hpp> int main(void) { boost::circular_buffer<int> cb(3); cb.push_back(0); cb.push_back(1); cb.push_back(2); std::cout << cb[0] << cb[1] << cb[2] << std::endl; cb.push_back(3); std::co</int></boost/circular_buffer.hpp></iostream>…