x019.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "xoutput.h"
4 #include <vector>
5 
6 namespace nmx::apps::x019 {
7 
11 inline void ex15() {
12  Format fmt{ __func__, ",", "\n", "csv" };
13  std::vector<std::vector<double>> table{ //
14  { 1, 2, 3, 4 },
15  { 6, 7, 8, 9 },
16  { 11, 12, 13, 14 }
17  };
18 
19  //Name der Datei ex15.csv im Verzeichnis x019
20  auto csvstream = Output::get_stream("x019", fmt);
21  fmt.set_defaults(csvstream);
22  fmt.as_columns(csvstream, table);
23 }
24 
25 } // namespace nmx::apps::x019
void ex15()
ex15 schreibe Tabelle in eine Datei im csv-Format
Definition: x019.h:11
static std::ofstream get_stream(const std::string &fname)
get_output_stream Öffnen einer Ausgabedatei falls die Datei nicht geöffnet werden kann wird ein Fehle...
Definition: xoutput.h:29
The Format class Formatierte Ausgabe von Arrays.
Definition: xfmt.h:10