foo.cpp: In function 'int cmp(const void*, const void*)':
foo.cpp:31:20: error: no matching function for call to 'NodeTp::NodeTp(const void*&)'
NodeTp y=*(NodeTp )b; return x.W > y.W ? 1:-1; }
^
foo.cpp:31:20: note: candidates are:
foo.cpp:11:8: note: NodeTp::NodeTp()
struct NodeTp
^
foo.cpp:11:8: note: candidate expects 0 arguments, 1 provided
foo.cpp:11:8: note: constexpr NodeTp::NodeTp(const NodeTp&)
foo.cpp:11:8: note: no known conversion for argument 1 from 'const void*' to 'const NodeTp&'
foo.cpp:11:8: note: constexpr NodeTp::NodeTp(NodeTp&&)
foo.cpp:11:8: note: no known conversion for argument 1 from 'const void*' to 'NodeTp&&'
foo.cpp: In function 'void init()':
foo.cpp:34:92: error: 'struct NodeTp' has no member named 'Lp'
scanf("%d%d%d",&n,&KL,&KR); for (i=1;i<=n;i++) {scanf("%d%d",&p[i].L,&p[i].R); p[i].W=p[i].Lp[i].R; } qsort(p+1,n,sizeof(p[1]),cmp); }
^