open for writing

This commit is contained in:
nachocano 2014-12-03 21:58:58 -08:00
parent dece767084
commit 7d314fef78

View File

@ -82,7 +82,7 @@ struct Matrix {
if (!strcmp(fname, "stdout")) { if (!strcmp(fname, "stdout")) {
fo = stdout; fo = stdout;
} else { } else {
fo = utils::FopenCheck(fname, "r"); fo = utils::FopenCheck(fname, "w");
} }
fprintf(fo, "%lu %lu\n", nrow, ncol); fprintf(fo, "%lu %lu\n", nrow, ncol);
for (size_t i = 0; i < data.size(); ++i) { for (size_t i = 0; i < data.size(); ++i) {