I\'d like to output some data to a file. For example assume I have two vectors of doubles:
vector data1(10); vector data2(10);
Slightly adapted from @sarnold's answer, for C++:
#define DEBUG(x) std::cout << #x << " = " << x << std::endl;
An example program which uses this:
int main() { int foo = 1; DEBUG(foo); return 0; }