Nikhil's blog

By Nikhil, 13 years ago, In English

Hi guys,

Many of you would've used a very handy function in Java that takes in a variable number of arguments (of possibly different types) and outputs them.

void debug(Object...args)
{
    System.out.println(Arrays.deepToString(args));
}


I've written some C++ code that behaves in an exactly identical manner that you can put in your C++ template as well.

Full text and comments »

  • Vote: I like it
  • +38
  • Vote: I do not like it