/ Vijos /

记录详情

Compile Error

foo.cpp:14:9: error: unable to find numeric literal operator 'operator""const'
 int cmp(0const void *xx,const void *yy)
         ^
foo.cpp:14:9: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
foo.cpp:14:25: error: expected primary-expression before 'const'
 int cmp(0const void *xx,const void *yy)
                         ^
foo.cpp:14:39: error: expression list treated as compound expression in initializer [-fpermissive]
 int cmp(0const void *xx,const void *yy)
                                       ^
foo.cpp:15:1: error: expected ',' or ';' before '{' token
 {
 ^
foo.cpp: In function 'int main()':
foo.cpp:41:39: error: invalid conversion from 'int' to 'int (*)(const void*, const void*)' [-fpermissive]
  int m=n;qsort(pi+1,m,sizeof(node),cmp);
                                       ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/cstdlib:72:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:59,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62,
                 from foo.cpp:3:
C:/TDM-GCC-32/include/stdlib.h:371:22: note: initializing argument 4 of 'void qsort(void*, size_t, size_t, int (*)(const void*, const void*))'
 _CRTIMP void __cdecl qsort(void*, size_t, size_t,
                      ^

信息

递交者
类型
递交
题目
P1977 推销员
语言
C++
递交时间
2015-11-13 19:30:47
评测时间
2015-11-13 19:30:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes