18 ms·
Well, one thing you can use alongside this project is a small library called cpp-dump, which lets you pretty print variables. https://github.com/philip82148/cpp
by mindblah 2y ago
Well, one thing you can use alongside this project is a small library called cpp-dump, which lets you pretty print variables. https://github.com/philip82148/cpp-dump https://github.com/philip82148/cpp-dump
It's just a normal library you can use with any compiled project, but it works nicely with Root C++ for built-in and std types.
Great if (say) you're working through implementing vector or linear algebra and want a nice way to display your multi-dimensional arrays and vectors.
Just copy the project folder somewhere (most conveniently where you invoke the interpreter from), do `#include "cpp-dump/dump.hpp` and then `cpp_dump(myVariable)` to print your variables.
You can see how it looks in this example where I was mucking about with permutations of vectors: https://i.imgur.com/yRpY5Bj.png https://i.imgur.com/yRpY5Bj.png