[Prev][Next][Index]

Printing elements of 2D arrays in pC++



Well, I am complaining about this every few months, but probably nobody
cares...

When you have
	double * foo[N];
in pC++, and then print
	printf( "%g", foo[i][j]);
, the pC++ pre-processor for some reasons creates an auxiliary function with 
the following signature:

int  pcxx_printf12(char *pCar_0, double *pCar_1){

This, of course, is incorrect, as the actual type of foo[i][j]
is double, not double*.

If anybody wants to see a sample pC++ program demonstrating this bug,
I'll send it you.

	--Vladimir