#include <stdio.h>

#if ! defined(__cplusplus)
#error "not compiled with C++"
#endif

extern "C" void logMsg(const char*fmt, int n1,int n2=0,int n3=0,int n4=0,int n5=0,int n6=0);

extern "C" void logMsg(const char*fmt, int n1,int n2,int n3,int n4,int n5,int n6)
{
	printf(fmt,n1,n2,n3,n4,n5,n6);
}

int main() {
	logMsg("%d\n",                1);
	logMsg("%d,%d\n",             1,2);
	logMsg("%d,%d,%d\n",          1,2,3);
	logMsg("%d,%d,%d,%d\n",       1,2,3,4);
	logMsg("%d,%d,%d,%d,%d\n",    1,2,3,4,5);
	logMsg("%d,%d,%d,%d,%d,%d\n", 1,2,3,4,5,6);
	
	printf("%d\n",__cplusplus);
	return 0;
}