-
-
Notifications
You must be signed in to change notification settings - Fork 87
ファイル出力
Kasuga Chiyo edited this page Feb 11, 2019
·
16 revisions
bool dtl::file::write::stl::csv(matrix, write_file_name);例
#include <array>
#include "DTL.hpp"
int main() {
using dungeon_t = bool;
std::array<std::array<dungeon_t, 10>, 8> matrix{ {} };
dtl::generator::common::stl::createBorder(matrix);
dtl::file::write::stl::csv(matrix, "read_test.csv");
dtl::file::read::stl::csv<dungeon_t>(matrix, "read_test.csv");
dtl::console::output::stl::stringBool(matrix, "##", " ");
return 0;
}書き込んだcsvデータ(write_test.csv)
1,1,1,1,1,1,1,1,1,1
1,0,0,0,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,1
1,1,1,1,1,1,1,1,1,1
出力例
####################
## ##
## ##
## ##
## ##
## ##
## ##
####################
Copyright (c) 2018-2021 As Project.
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)