struct S1 { double val; int rank; }; struct DoubleIntPair { double x; int y; }; void convert(void * buf, int count) { struct DoubleIntPair * p = (struct DoubleIntPair *)buf; struct DoubleIntPair newbuf[count]; for (int i=0; i