How to define function/macro so it is accesible throughout various cpp files
Have you thought of turning it into a small library?

libraries/StreamPrint/StreamPrint.cpp:

#include &lt;StreamPrint.h&gt;

void StreamPrint_progmem(Print &amp;out,PGM_P format,...)
{
  // program memory version of printf - copy of format string and result share a buffer
  // so as to avoid too much memory use
  char formatString[128], *ptr;
  strncpy_P( formatString, format, sizeof(formatString) ); // copy in from program mem
  // null terminate - leave last char since we might need it in worst case for result's \0
  formatString[ sizeof(formatString)-2 ]='\0'; 
  ptr=&amp;formatString[ strlen(formatString)+1 ]; // our result buffer...
  va_list args;
  va_start (args,format);
  vsnprintf(ptr, sizeof(formatString)-1-strlen(formatString), formatString, args );
  va_end (args);
  formatString[ sizeof(formatString)-1 ]='\0'; 
  out.print(ptr);
}


libraries/StreamPrint/StreamPrint.h:

#include &lt;Arduino.h&gt;

extern void StreamPrint_progmem(Print &amp;out,PGM_P format,...);

#define Serialprint(format, ...) StreamPrint_progmem(Serial,PSTR(format),##__VA_ARGS__)
#define Streamprint(stream,format, ...) StreamPrint_progmem(stream,PSTR(format),##__VA_ARGS__)


Then in your code, wherever you want to use it:

#include &lt;StreamPrint.h&gt;


You can read more about writing libraries here: http://www.arduino.cc/en/Hacking/LibraryTutorial