foo.cc:71:1: error: 'void people::total()' conflicts with a previous declaration
71 | };
| ^
foo.cc:8:13: note: previous declaration 'int people::total'
8 | int total;
| ^~~~~
foo.cc:105:2: error: expected '}' at end of input
105 | }
| ^
foo.cc:6:13: note: to match this '{'
6 | class people{
| ^
foo.cc: In constructor 'people::people(char*, int, int, char, char, int)':
foo.cc:11:24: error: 'name' was not declared in this scope; did you mean 'tzname'?
11 | strcpy(name,n);
| ^~~~
| tzname
foo.cc:12:17: error: 'final_ave' was not declared in this scope
12 | final_ave = f;
| ^~~~~~~~~
foo.cc:13:17: error: 'class_jud' was not declared in this scope
13 | class_jud = c;
| ^~~~~~~~~
foo.cc:14:17: error: 'flag' was not declared in this scope
14 | flag = fl;
| ^~~~
foo.cc:15:17: error: 'west_flag' was not declared in this scope
15 | west_flag = w;
| ^~~~~~~~~
foo.cc:16:17: error: 'paper' was not declared in this scope
16 | paper = p;
| ^~~~~
foo.cc: In member function 'int people::jud_yuanshi()':
foo.cc:20:20: error: 'final_ave' was not declared in this scope
20 | if(final_ave > 80 && paper >= 1){
| ^~~~~~~~~
foo.cc:20:38: error: 'paper' was not declared in this scope
20 | if(final_ave > 80 && paper >= 1){
| ^~~~~
foo.cc:22:25: error: expected '}' before 'else'
22 | else{
| ^~~~
foo.cc:20:49: note: to match this '{'
20 | if(final_ave > 80 && paper >= 1){
| ^
foo.cc: In member function 'int people::jud_wusi()':
foo.cc:28:20: error: 'final_ave' was not declared in this scope
28 | if(final_ave > 85 && class_jud > 80){
| ^~~~~~~~~
foo.cc:28:38: error: 'class_jud' was not declared in this scope
28 | if(final_ave > 85 && class_jud > 80){
| ^~~~~~~~~
foo.cc:30:25: error: expected '}' before 'else'
30 | else{
| ^~~~
foo.cc:28:53: note: to match this '{'
28 | if(final_ave > 85 && class_jud > 80){
| ^
foo.cc: In member function 'int people::jud_chengji()':
foo.cc:36:20: error: 'final_ave' was not declared in this scope
36 | if(final_ave > 90){
| ^~~~~~~~~
foo.cc:38:25: error: expected '}' before 'else'
38 | else{
| ^~~~
foo.cc:36:35: note: to match this '{'
36 | if(final_ave > 90){
| ^
foo.cc: In member function 'int people::jud_xibu()':
foo.cc:44:20: error: 'final_ave' was not declared in this scope
44 | if(final_ave > 85 && west_flag == 'Y'){
| ^~~~~~~~~
foo.cc:44:38: error: 'west_flag' was not declared in this scope
44 | if(final_ave > 85 && west_flag == 'Y'){
| ^~~~~~~~~
foo.cc:46:25: error: expected '}' before 'else'
46 | else{
| ^~~~
foo.cc:44:55: note: to match this '{'
44 | if(final_ave > 85 && west_flag == 'Y'){
| ^
foo.cc: In member function 'int people::jud_banji()':
foo.cc:52:20: error: 'class_jud' was not declared in this scope
52 | if(class_jud > 80 && flag == 'Y'){
| ^~~~~~~~~
foo.cc:52:38: error: 'flag' was not declared in this scope
52 | if(class_jud > 80 && flag == 'Y'){
| ^~~~
foo.cc:54:25: error: expected '}' before 'else'
54 | else{
| ^~~~
foo.cc:52:50: note: to match this '{'
52 | if(class_jud > 80 && flag == 'Y'){
| ^
foo.cc: In member function 'void people::total()':
foo.cc:61:24: error: a function-definition is not allowed here before '{' token
61 | void out_name(){
| ^
foo.cc:64:1: error: expected primary-expression before 'private'
64 | private:
| ^~~~~~~
foo.cc:66:13: warning: unused variable 'final_ave' [-Wunused-variable]
66 | int final_ave;
| ^~~~~~~~~
foo.cc:67:13: warning: unused variable 'class_jud' [-Wunused-variable]
67 | int class_jud;
| ^~~~~~~~~
foo.cc:68:14: warning: unused variable 'flag' [-Wunused-variable]
68 | char flag;
| ^~~~
foo.cc:69:14: warning: unused variable 'west_flag' [-Wunused-variable]
69 | char west_flag;
| ^~~~~~~~~
foo.cc:70:13: warning: unused variable 'paper' [-Wunused-variable]
70 | int paper;
| ^~~~~
foo.cc: In member function 'int people::main()':
foo.cc:75:17: error: no matching function for call to 'people::people()'
75 | people p[100];
| ^
foo.cc:10:9: note: candidate: 'people::people(char*, int, int, char, char, int)'
10 | people(char n[20],int f,int c,char fl,char w,int p){
| ^~~~~~
foo.cc:10:9: note: candidate expects 6 arguments, 0 provided
foo.cc:6:7: note: candidate: 'constexpr people::people(const people&)'
6 | class people{
| ^~~~~~
foo.cc:6:7: note: candidate expects 1 argument, 0 provided
foo.cc:6:7: note: candidate: 'constexpr people::people(people&&)'
foo.cc:6:7: note: candidate expects 1 argument, 0 provided
foo.cc:82:13: error: conflicting declaration 'int p'
82 | int p;
| ^
foo.cc:75:12: note: previous declaration as 'people p [100]'
75 | people p[100];
| ^
foo.cc:85:22: error: array must be initialized with a brace-enclosed initializer
85 | int j[100] = -1;
| ^~
foo.cc:88:48: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and 'people [100]')
88 | cin >> na >> f >> c >> fl >> w >> p;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~
| | |
| | people [100]
| std::basic_istream<char>
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
168 | operator>>(bool& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:168:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'people*'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
172 | operator>>(short& __n);
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:172:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'short int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(short int)((people*)(& p))' to 'short int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:175:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
175 | operator>>(unsigned short& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:175:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'short unsigned int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(short unsigned int)((people*)(& p))' to 'short unsigned int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:179:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
179 | operator>>(int& __n);
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:179:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(int)((people*)(& p))' to 'int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:182:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
182 | operator>>(unsigned int& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:182:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'unsigned int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(unsigned int)((people*)(& p))' to 'unsigned int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:186:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
186 | operator>>(long& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:186:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'long int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(long int)((people*)(& p))' to 'long int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:190:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
190 | operator>>(unsigned long& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:190:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'long unsigned int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(long unsigned int)((people*)(& p))' to 'long unsigned int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:195:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
195 | operator>>(long long& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:195:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'long long int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(long long int)((people*)(& p))' to 'long long int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:199:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: invalid conversion from 'people*' to 'long long unsigned int' [-fpermissive]
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
| |
| people*
foo.cc:88:51: error: cannot bind rvalue '(long long unsigned int)((people*)(& p))' to 'long long unsigned int&'
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:235:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' (near match)
235 | operator>>(void*& __p)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:235:7: note: conversion of argument 1 would be ill-formed:
foo.cc:88:51: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:120:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'
120 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:120:36: note: no known conversion for argument 1 from 'people [100]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
120 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:124:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]'
124 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:124:32: note: no known conversion for argument 1 from 'people [100]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
124 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:131:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'
131 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:131:30: note: no known conversion for argument 1 from 'people [100]' to 'std::ios_base& (*)(std::ios_base&)'
131 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:214:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'
214 | operator>>(float& __f)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:214:25: note: no known conversion for argument 1 from 'people [100]' to 'float&'
214 | operator>>(float& __f)
| ~~~~~~~^~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:218:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'
218 | operator>>(double& __f)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:218:26: note: no known conversion for argument 1 from 'people [100]' to 'double&'
218 | operator>>(double& __f)
| ~~~~~~~~^~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:222:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]'
222 | operator>>(long double& __f)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:222:31: note: no known conversion for argument 1 from 'people [100]' to 'long double&'
222 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:259:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]'
259 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:259:36: note: no known conversion for argument 1 from 'people [100]' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
259 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/string:56,
from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/locale_classes.h:40,
from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:41,
from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/ios:42,
from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/ostream:38,
from iostream:39:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/basic_string.tcc:1485:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
1485 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/basic_string.tcc:1485:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'people [100]'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from /nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:995,
from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/istream.tcc:958:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)'
958 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/bits/istream.tcc:958:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: deduced conflicting types for parameter '_CharT' ('char' and 'people [100]')
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:756:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)'
756 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:756:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: cannot convert 'p' (type 'people [100]') to type 'unsigned char&'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:761:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)'
761 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:761:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: cannot convert 'p' (type 'people [100]') to type 'signed char&'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:803:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT*)'
803 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:803:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: deduced conflicting types for parameter '_CharT' ('char' and 'people')
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:825:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)'
825 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:825:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: cannot convert 'p' (type 'people [100]') to type 'unsigned char*'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:831:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)'
831 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:831:5: note: template argument deduction/substitution failed:
foo.cc:88:51: note: cannot convert 'p' (type 'people [100]') to type 'signed char*'
88 | cin >> na >> f >> c >> fl >> w >> p;
| ^
In file included from iostream:40:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:985:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
985 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:985:5: note: template argument deduction/substitution failed:
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_istream<char>&; _Tp = people (&)[100]]':
foo.cc:88:37: required from here
/nix/store/l4dvshb0bw0ipyx17f6rknzk83mdx81y-gcc-11.3.0/include/c++/11.3.0/istream:985:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
foo.cc:89:23: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
89 | people[i].people(na,f,c,fl,w,p);
| ^
foo.cc:89:23: error: structured binding declaration cannot have type 'people'
89 | people[i].people(na,f,c,fl,w,p);
| ^~~
foo.cc:89:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:89:24: error: redeclaration of 'auto i'
89 | people[i].people(na,f,c,fl,w,p);
| ^
foo.cc:87:17: note: 'int i' previously declared here
87 | for(int i = 0;i < n;i++){
| ^
foo.cc:89:26: error: expected initializer before '.' token
89 | people[i].people(na,f,c,fl,w,p);
| ^
foo.cc:89:26: error: expected ';' before '.' token
foo.cc:90:22: error: expression cannot be used as a function
90 | total();
| ~~~~~^~
foo.cc:91:28: error: expected primary-expression before '[' token
91 | t += people[i].total;
| ^
foo.cc:92:26: error: expected unqualified-id before '[' token
92 | if(people[i].total < people[i+1].total){
| ^
foo.cc:94:32: error: expected unqualified-id before '[' token
94 | }else if(people[i].total = people[i+1].total){
| ^
foo.cc:101:31: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
101 | people[i].out_name();
| ^
foo.cc:101:31: error: structured binding declaration cannot have type 'people'
101 | people[i].out_name();
| ^~~
foo.cc:101:31: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:101:34: error: expected initializer before '.' token
101 | people[i].out_name();
| ^
foo.cc:101:34: error: expected ';' before '.' token
foo.cc:102:39: error: expected primary-expression before '[' token
102 | cout << people[i].total << endl;
| ^
foo.cc:105:2: error: expected '}' at end of input
105 | }
| ^
foo.cc:74:1: note: to match this '{'
74 | {
| ^
foo.cc:105:2: warning: no return statement in function returning non-void [-Wreturn-type]
105 | }
| ^
foo.cc: At global scope:
foo.cc:105:2: error: expected unqualified-id at end of input