0_0_39827381_29849.cpp: In function 'int main()':
0_0_39827381_29849.cpp:7:55: error: no matching function for call to 'std::vector<double>::vector(int&, std::vector<double>)'
7 | vector<double> student_scores(n, vector<double>(m));
| ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
from 0_0_39827381_29849.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:702:9: note: candidate: 'template<class _InputIterator, class> constexpr std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = double; _Alloc = std::allocator<double>]'
702 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:702:9: note: template argument deduction/substitution failed:
0_0_39827381_29849.cpp:7:55: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'std::vector<double>')
7 | vector<double> student_scores(n, vector<double>(m));
| ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:673:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; allocator_type = std::allocator<double>]'
673 | vector(initializer_list<value_type> __l,
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:673:43: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<double>'
673 | vector(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:654:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>; std::__type_identity_t<_Alloc> = std::allocator<double>]'
654 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:654:23: note: no known conversion for argument 1 from 'int' to 'std::vector<double>&&'
654 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m)
| ~~~~~~~~~^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:635:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = double; _Alloc = std::allocator<double>; allocator_type = std::allocator<double>; std::false_type = std::integral_constant<bool, false>]'
635 | vector(vector&& __rv, const allocator_type& __m, false_type)
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 2 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:630:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = double; _Alloc = std::allocator<double>; allocator_type = std::allocator<double>; std::true_type = std::integral_constant<bool, true>]'
630 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:630:7: note: candidate expects 3 arguments, 2 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:619:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>; std::__type_identity_t<_Alloc> = std::allocator<double>]'
619 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:619:28: note: no known conversion for argument 1 from 'int' to 'const std::vector<double>&'
619 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
| ~~~~~~~~~~~~~~^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:615:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator<double>]'
615 | vector(vector&&) noexcept = default;
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:615:7: note: candidate expects 1 argument, 2 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:596:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]'
596 | vector(const vector& __x)
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:596:7: note: candidate expects 1 argument, 2 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:564:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; size_type = long long unsigned int; value_type = double; allocator_type = std::allocator<double>]'
564 | vector(size_type __n, const value_type& __value,
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:564:47: note: no known conversion for argument 2 from 'std::vector<double>' to 'const std::vector<double>::value_type&' {aka 'const double&'}
564 | vector(size_type __n, const value_type& __value,
| ~~~~~~~~~~~~~~~~~~^~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:551:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; size_type = long long unsigned int; allocator_type = std::allocator<double>]'
551 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:551:51: note: no known conversion for argument 2 from 'std::vector<double>' to 'const std::vector<double>::allocator_type&' {aka 'const std::allocator<double>&'}
551 | vector(size_type __n, const allocator_type& __a = allocator_type())
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:537:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = double; _Alloc = std::allocator<double>; allocator_type = std::allocator<double>]'
537 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:537:7: note: candidate expects 1 argument, 2 provided
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:526:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>::vector() [with _Tp = double; _Alloc = std::allocator<double>]'
526 | vector() = default;
| ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:526:7: note: candidate expects 0 arguments, 2 provided
0_0_39827381_29849.cpp:14:37: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}[int]' for array subscript
14 | cin >> student_scores[i][j];
| ^
0_0_39827381_29849.cpp:15:50: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}[int]' for array subscript
15 | course_scores[j] += student_scores[i][j];
| ^
0_0_39827381_29849.cpp:24:45: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}[int]' for array subscript
24 | student_avg += student_scores[i][j];
| ^
0_0_39827381_29849.cpp:29:34: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}[int]' for array subscript
29 | if (student_scores[i][j] < course_avg[j]) {
| ^
0_0_39827381_29849.cpp:39:26: error: 'setprecision' was not declared in this scope
39 | cout << fixed << setprecision(2) << student_avg << endl;
| ^~~~~~~~~~~~
0_0_39827381_29849.cpp:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; did you forget to '#include <iomanip>'?
2 | #include <vector>
+++ |+#include <iomanip>
3 | using namespace std;
0_0_39827381_29849.cpp:39:45: error: 'student_avg' was not declared in this scope
39 | cout << fixed << setprecision(2) << student_avg << endl;
| ^~~~~~~~~~~
0_0_39827381_29849.cpp:42:26: error: 'setprecision' was not declared in this scope
42 | cout << fixed << setprecision(2) << course_avg[j] << " ";
| ^~
|