私はエージェントモデリングプロジェクトに取り組んでおり、そのためにrepastを使うことに決めました。 私は以前にライブラリの束をあらかじめインストールしておき、Repastソースをダウンロードしてプロジェクトに組み込もうとしました。しかし、突然私が理解できないエラーを得る。C++コンパイルエラー(REPASTライブラリ)
error: no match for ‘operator+’ in ‘std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) [with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator](((const char*)"_")) + boost::filesystem3::path::filename() const()’
CODE:
NCDataSet::NCDataSet(std::string file, const Schedule& schedule) :
file_(file), schedule_(&schedule), start(0), open(true)
{
rank = RepastProcess::instance()->rank();
if (rank == 0) {
fs::path filepath(file);
if (!fs::exists(filepath.parent_path())) {
fs::create_directories(filepath.parent_path());
} else if (fs::exists(filepath)) {
string ts;
repast::timestamp2(ts);
fs::path to(filepath.parent_path()/(ts + "_" + filepath.filename()));
fs::rename(filepath, to);
}
}
}
ERROR LINE: fs::path to(filepath.parent_path()/(ts + "_" + filepath.filename()));
感謝!
唯一のエラーですか?そうでない場合、完全なコンパイラ出力を投稿できますか? – hmjd