PrintUtils
std::cout Overloaded
Loading...
Searching...
No Matches
C:/Users/harshn/Desktop/PrintUtils/example.cpp
Go to the documentation of this file.
1
2
#include "
PrintUtils.hpp
"
3
#include <vector>
4
#include <iostream>
5
10
int
main
()
11
{
12
13
std::vector<int> v = {1, 2, 3, 4, 5};
14
std::cout <<
"Vector v = \n"
15
<< v << std::endl;
16
std::vector<std::vector<int>> vv = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
17
std::cout <<
"Matrix vv = \n"
18
<< vv << std::endl;
19
PrintUtils::CSV<int>::TwoDVectorAsTwoDVector
(vv,
"matrix.csv"
);
20
return
0;
21
}
PrintUtils.hpp
Contains utility functions for printing vectors and matrices.
PrintUtils::CSV::TwoDVectorAsTwoDVector
static void TwoDVectorAsTwoDVector(std::vector< std::vector< T > > M, std::string Filename)
Prints a two-dimensional vector as a two-dimensional CSV file.
Definition
PrintUtils.hpp:246
main
int main()
Definition
example.cpp:10
example.cpp
Generated on Wed Jun 5 2024 17:52:16 for PrintUtils by
1.10.0