/in/foo.cc:7:35: error: invalid use of cv-qualified type 'const void' in parameter declaration
int cmp(const void *a ,const void b)
^
/in/foo.cc: In function 'int cmp(const void*, <type error>)':
/in/foo.cc:9:13: error: request for member 'fen' in '(aa*)a', which is of pointer type 'aa*' (maybe you meant to use '->' ?)
if(((aa*)a).fen>((aa)b).fen) return -1;
^~~
/in/foo.cc:10:9: error: no matching function for call to 'aa::aa(const void*&)'
if(((aa)a).fen<((aa)b).fen) return 1;
^
/in/foo.cc:4:8: note: candidate: aa::aa()
struct aa{
^~
/in/foo.cc:4:8: note: candidate expects 0 arguments, 1 provided
/in/foo.cc:4:8: note: candidate: constexpr aa::aa(const aa&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'const void*' to 'const aa&'
/in/foo.cc:4:8: note: candidate: constexpr aa::aa(aa&&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'const void*' to 'aa&&'
/in/foo.cc:11:9: error: no matching function for call to 'aa::aa(const void*&)'
if(((aa)a).hao<((aa)b).hao) return -1;
^
/in/foo.cc:4:8: note: candidate: aa::aa()
struct aa{
^~
/in/foo.cc:4:8: note: candidate expects 0 arguments, 1 provided
/in/foo.cc:4:8: note: candidate: constexpr aa::aa(const aa&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'const void*' to 'const aa&'
/in/foo.cc:4:8: note: candidate: constexpr aa::aa(aa&&)
/in/foo.cc:4:8: note: no known conversion for argument 1 from 'const void*' to 'aa&&'
/in/foo.cc: In function 'int main()':
/in/foo.cc:19:31: error: cannot convert 'int (*)(const void*, <type error>)' to '__compar_fn_t {aka int (*)(const void*, const void*)}' for argument '4' to 'void qsort(void*, size_t, size_t, __compar_fn_t)'
qsort(ren,n,sizeof(ren[0]),cmp);
^
/in/foo.cc: In function 'int cmp(const void*, <type error>)':
/in/foo.cc:12:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^