/in/exam3_matrix.cpp: In constructor 'intMatrix::intMatrix()':
/in/exam3_matrix.cpp:11:20: error: left operand of comma operator has no effect [-Werror=unused-value]
flatternArray[1,1];
^
/in/exam3_matrix.cpp:11:21: error: value computed is not used [-Werror=unused-value]
flatternArray[1,1];
~~~~~~~~~~~~~~~~~^
/in/exam3_matrix.cpp:11:21: error: statement has no effect [-Werror=unused-value]
/in/exam3_matrix.cpp: At global scope:
/in/exam3_matrix.cpp:13:1: error: prototype for 'intMatrix::intMatrix(int, int, int)' does not match any in class 'intMatrix'
intMatrix::intMatrix(int r,int c,int initialValue) {
^~~~~~~~~
In file included from /in/exam3_matrix.cpp:1:0:
/in/exam3_matrix.h:3:7: error: candidates are: constexpr intMatrix::intMatrix(const intMatrix&)
class intMatrix
^~~~~~~~~
/in/exam3_matrix.cpp:8:1: error: intMatrix::intMatrix()
intMatrix::intMatrix() {
^~~~~~~~~
/in/exam3_matrix.cpp: In member function 'void intMatrix::fillFrom(std::vector<int>&)':
/in/exam3_matrix.cpp:32:44: error: unused parameter 'source' [-Werror=unused-parameter]
void intMatrix::fillFrom(std::vector<int> &source){
^~~~~~
/in/exam3_matrix.cpp: In member function 'int intMatrix::getElement(int, int)':
/in/exam3_matrix.cpp:36:40: error: invalid types 'int[int]' for array subscript
return flatternArray[rowNum][colNum];
^
/in/exam3_matrix.cpp: In member function 'void intMatrix::saveTo(std::__cxx11::string)':
/in/exam3_matrix.cpp:45:29: error: no matching function for call to 'getline(std::ofstream&, std::__cxx11::string&)'
while (getline(fin, line)) {
^
In file included from /usr/include/c++/7/cstdio:42:0,
from /usr/include/c++/7/ext/string_conversions.h:43,
from /usr/include/c++/7/bits/basic_string.h:6361,
from /usr/include/c++/7/string:52,
from /in/exam3_matrix.h:2,
from /in/exam3_matrix.cpp:1:
/usr/include/stdio.h:616:20: note: candidate: __ssize_t getline(char**, size_t*, FILE*)
extern _IO_ssize_t getline (char **__restrict __lineptr,
^~~~~~~
/usr/include/stdio.h:616:20: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/7/string:52:0,
from /in/exam3_matrix.h:2,
from /in/exam3_matrix.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6339:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
getline(basic_istream<_CharT, _Traits>&& __is,
^~~~~~~
/usr/include/c++/7/bits/basic_string.h:6339:5: note: template argument deduction/substitution failed:
/in/exam3_matrix.cpp:45:29: note: 'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
while (getline(fin, line)) {
^
In file included from /usr/include/c++/7/string:52:0,
from /in/exam3_matrix.h:2,
from /in/exam3_matrix.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6332:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
getline(basic_istream<_CharT, _Traits>&& __is,
^~~~~~~
/usr/include/c++/7/bits/basic_string.h:6332:5: note: template argument deduction/substitution failed:
/in/exam3_matrix.cpp:45:29: note: 'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
while (getline(fin, line)) {
^
In file included from /usr/include/c++/7/string:52:0,
from /in/exam3_matrix.h:2,
from /in/exam3_matrix.cpp:1:
/usr/include/c++/7/bits/basic_string.h:6324:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
getline(basic_istream<_CharT, _Traits>& __is,
^~~~~~~
/usr/include/c++/7/bits/basic_string.h:6324:5: note: template argument deduction/substitution failed:
/in/exam3_matrix.cpp:45:29: note: 'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
while (getline(fin, line)) {
^
In file included from /usr/include/c++/7/string:53:0,
from /in/exam3_matrix.h:2,
from /in/exam3_matrix.cpp:1:
/usr/include/c++/7/bits/basic_string.tcc:1537:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
getline(basic_istream<_CharT, _Traits>& __in,
^~~~~~~
/usr/include/c++/7/bits/basic_string.tcc:1537:5: note: template argument deduction/substitution failed:
/in/exam3_matrix.cpp:45:29: note: 'std::ofstream {aka std::basic_ofstream<char>}' is not derived from 'std::basic_istream<_CharT, _Traits>'
while (getline(fin, line)) {
^
cc1plus: all warnings being treated as errors