Google のウェブログ公開ツールを使って、テキスト、写真、動画を共有できます。
_ [C++][boost]素人が書く C++ ファイル削除。Boost を使います。 #include <boost/filesystem/operations.hpp> #include <boost/filesystem/fstream.hpp> #include <iostream> #include <string> using namespace std; namespace fs = boost::filesystem; int main( int ac, char** av ) { string fn = av[ 1 ]; string sout = "hello"; string sin; ofstream fout( fn.c_str() ); ifstream fin( fn.c_str() ); fout << sout << endl; fin >> sin; c
元々、TracLightingのApache上に、php、OpenPNEとやんちゃな入れ方をしていたサーバマシンを再セットアップ。 MySQLの管理が楽なのでXAMPPを入れる事に。 以下、時系列に。 ・XAMPP、最新版の1.7.2を入れる。 http://www.apachefriends.org/jp/xampp-windows.html ・MediaWiki 1.16をSVNから入れてみるが失敗。1.15をインストール。 http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_15/phase3 って、1.16じゃなくて、1.6入れようとして古いからエラー出たんじゃね・・・? その他もろもろ、プラグインを設定。 ・OpenPNE3をインストールしようとする 最近流行ってるらしい、symfonyというフレームワークのインストー
STL のバインダとリファレンスへのリファレンス問題 STL に含まれる bind1st と bind2nd は for_each や find などの関数と組み合わせて使うと便利です。しかしながら、リファレンス (参照) を引数に取る関数の引数をバインドすることはできないので注意が必要です。 注意が必要ですと言いつつ、自分がこの問題を知らずにはまりました。次のようなコードで問題は起きます。 #include <algorithm> #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; void print(const string& s1, const string& s2) { cout << s1 << ": " << s2 << endl;
#include <iostream> #include <algorithm> #include <iterator> #include <cstdlib> #include <cassert> #include "Vec.h" // 研究室メンバ共用のライブラリのヘッダファイル double EPS = 1.0e-10; // Vec.h 内で使用する定数 double DET_EPS = EPS; // 同上 // 比較演算子 (<) // (数学的な大小を定義しているわけではない.あくまで <algorithm> 用.) bool operator < (const Lab::VecC& lhs, const Lab::VecC& rhs) { assert(lhs.size() == rhs.size()); if (lhs == rhs) return false; for (
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く