Skip to content

DorukCem/Print-Iterable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Header only library for printing C++ containers such as vector and map

How to download library

Just download print.h and include it in your project

How to use

The library has only one function print which is under the namespace p

using namespace p

std::vector<int> veci{1, 2, 3};
print(veci);

Also works for deeply nested containers

std::vector<std::vector<std::vector<int>>> vecofvecofvecs = {{{1,2}, {1,4}}, {{2,5}, {4,2}}}
print(vecofvecofvecs);

Two optional parameters are available for specifying the delimiter and end character

print(std::vector<int>{1,2,3,4}, "-"); // 1-2-3-4
print(std::vector<int>{1,2,3,4}, "**", "|x"); // 1**2**3**4|x

About

Header only library for printing C++ containers such as vector and map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages