foo.cc: In function ‘int main()’:
foo.cc:39:13: warning: ‘sum’ may be used uninitialized [-Wmaybe-uninitialized]
39 | int max=sum[1],u;
| ^~~
foo.cc:8:13: note: ‘sum’ declared here
8 | int sum[1000],num=0,qimo[1000],pingyi[1000],c[1000];
| ^~~
In file included from /nix/gcc-13.2.0/include/c++/13.2.0/string:54,
from /nix/gcc-13.2.0/include/c++/13.2.0/bitset:52,
from stdc++.h:52:
In member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pointer std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_data() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’,
inlined from ‘const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::data() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:2597:23,
inlined from ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:4025:30,
inlined from ‘int main()’ at foo.cc:46:14:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/basic_string.h:223:28: warning: ‘u’ may be used uninitialized [-Wmaybe-uninitialized]
223 | { return _M_dataplus._M_p; }
| ^~~~
foo.cc: In function ‘int main()’:
foo.cc:39:24: note: ‘u’ was declared here
39 | int max=sum[1],u;
| ^