记录详情

Runtime Error

/in/foo.cc: In constructor 'Person::Person(std::__cxx11::string, int, int, int, int, int, int)':
/in/foo.cc:51:18: warning: format '%c' expects argument of type 'int', but argument 2 has type 'std::__cxx11::string* {aka std::__cxx11::basic_string<char>*}' [-Wformat=]
   printf("%c",&na);
                  ^
/in/foo.cc: In destructor 'virtual Person::~Person()':
/in/foo.cc:56:18: warning: format '%c' expects argument of type 'int', but argument 2 has type 'std::__cxx11::string* {aka std::__cxx11::basic_string<char>*}' [-Wformat=]
   printf("%c",&na);
                  ^
/in/foo.cc: In member function 'void Person::print()':
/in/foo.cc:63:25: warning: format '%c' expects argument of type 'int', but argument 2 has type 'std::__cxx11::string* {aka std::__cxx11::basic_string<char>*}' [-Wformat=]
         printf("%c ",&na);
                         ^
/in/foo.cc: In function 'int main(int, const char**)':
/in/foo.cc:73:18: warning: format '%c' expects argument of type 'char*', but argument 2 has type 'std::__cxx11::string* {aka std::__cxx11::basic_string<char>*}' [-Wformat=]
     scanf("%c",&t);
                  ^
/in/foo.cc:76:18: warning: format '%c' expects argument of type 'char*', but argument 2 has type 'std::__cxx11::string* {aka std::__cxx11::basic_string<char>*}' [-Wformat=]
     scanf("%c",&t);
                  ^
# 状态 耗时 内存占用
#1 Runtime Error *** Error in `foo': free(): invalid pointer: 0x00007ffea134bc61 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f524b4eebfb] /lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f524b4f4fc6] /lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7f524b4f580e] foo(+0x112f)[0x55c29692a12f] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f524b49e2e1] foo(+0x122a)[0x55c29692a22a] ======= Memory map: ======== 55c296929000-55c29692c000 r-xp 00000000 00:2a 44112 /in/package/foo 55c296b2b000-55c296b2c000 r--p 00002000 00:2a 44112 /in/package/foo 55c296b2c000-55c296b2d000 rw-p 00003000 00:2a 44112 /in/package/foo 55c297750000-55c297782000 rw-p 00000000 00:00 0 [heap] 7f5244000000-7f5244021000 rw-p 00000000 00:00 0 7f5244021000-7f5248000000 ---p 00000000 00:00 0 7f524b47e000-7f524b613000 r-xp 00000000 00:2a 36 /lib/x86_64-linux-gnu/libc-2.24.so 7f524b613000-7f524b813000 ---p 00195000 00:2a 36 /lib/x86_64-linux-gnu/libc-2.24.so 7f524b813000-7f524b817000 r--p 00195000 00:2a 36 /lib/x86_64-linux-gnu/libc-2.24.so 7f524b817000-7f524b819000 rw-p 00199000 00:2a 36 /lib/x86_64-linux-gnu/libc-2.24.so 7f524b819000-7f524b81d000 rw-p 00000000 00:00 0 7f524b81d000-7f524b833000 r-xp 00000000 00:2a 1269 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f524b833000-7f524ba32000 ---p 00016000 00:2a 1269 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f524ba32000-7f524ba33000 r--p 00015000 00:2a 1269 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f524ba33000-7f524ba34000 rw-p 00016000 00:2a 1269 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f524ba34000-7f524bb37000 r-xp 00000000 00:2a 76 /lib/x86_64-linux-gnu/libm-2.24.so 7f524bb37000-7f524bd36000 ---p 00103000 00:2a 76 /lib/x86_64-linux-gnu/libm-2.24.so 7f524bd36000-7f524bd37000 r--p 00102000 00:2a 76 /lib/x86_64-linux-gnu/libm-2.24.so 7f524bd37000-7f524bd38000 rw-p 00103000 00:2a 76 /lib/x86_64-linux-gnu/libm-2.24.so 7f524bd38000-7f524beaa000 r-xp 00000000 00:2a 1421 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7f524beaa000-7f524c0aa000 ---p 00172000 00:2a 1421 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7f524c0aa000-7f524c0b4000 r--p 00172000 00:2a 1421 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7f524c0b4000-7f524c0b6000 rw-p 0017c000 00:2a 1421 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7f524c0b6000-7f524c0ba000 rw-p 00000000 00:00 0 7f524c0ba000-7f524c0dd000 r-xp 00000000 00:2a 33 /lib/x86_64-linux-gnu/ld-2.24.so 7f524c2d5000-7f524c2dd000 rw-p 00000000 00:00 0 7f524c2dd000-7f524c2de000 r--p 00023000 00:2a 33 /lib/x86_64-linux-gnu/ld-2.24.so 7f524c2de000-7f524c2df000 rw-p 00024000 00:2a 33 /lib/x86_64-linux-gnu/ld-2.24.so 7f524c2df000-7f524c2e0000 rw-p 00000000 00:00 0 7ffea132b000-7ffea134c000 rw-p 00000000 00:00 0 [stack] 7ffea13c0000-7ffea13c2000 r--p 00000000 00:00 0 [vvar] 7ffea13c2000-7ffea13c4000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] 2ms 452.0 KiB

信息

递交者
类型
自测
题目
P1038 OO9-1 组合了日期类的人类的一生
语言
C++
递交时间
2019-04-13 20:37:43
评测时间
2019-04-13 20:37:43
评测机
分数
0
总耗时
2ms
峰值内存
452.0 KiB