/in/foo.c:4:1: error: unknown type name 'using'
using namespace std;
^~~~~
/in/foo.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
using namespace std;
^~~
/in/foo.c:12:9: error: unknown type name 'DATA'
int cmp(DATA a, DATA b)
^~~~
/in/foo.c:12:17: error: unknown type name 'DATA'
int cmp(DATA a, DATA b)
^~~~
/in/foo.c: In function 'main':
/in/foo.c:32:42: error: 'cmp' undeclared (first use in this function)
qsort(person + 1, n, sizeof(person[0]), cmp); //用快速排序对W和num同时排序
^~~
/in/foo.c:32:42: note: each undeclared identifier is reported only once for each function it appears in