Record Detail

Compile Error

/in/exam3_matrix.cpp:15:70: error: default argument given for parameter 1 of 'intMatrix::intMatrix(int, int, int)' [-fpermissive]
 intMatrix::intMatrix(int rows = 1, int cols = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
                                                                      ^
In file included from /in/exam3_matrix.cpp:9:0:
/in/compile/exam3_matrix.h:27:2: note: previous specification in 'intMatrix::intMatrix(int, int, int)' here
  intMatrix(int r = 1 , int c = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
  ^~~~~~~~~
/in/exam3_matrix.cpp:15:70: error: default argument given for parameter 2 of 'intMatrix::intMatrix(int, int, int)' [-fpermissive]
 intMatrix::intMatrix(int rows = 1, int cols = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
                                                                      ^
In file included from /in/exam3_matrix.cpp:9:0:
/in/compile/exam3_matrix.h:27:2: note: previous specification in 'intMatrix::intMatrix(int, int, int)' here
  intMatrix(int r = 1 , int c = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
  ^~~~~~~~~
/in/exam3_matrix.cpp:15:70: error: default argument given for parameter 3 of 'intMatrix::intMatrix(int, int, int)' [-fpermissive]
 intMatrix::intMatrix(int rows = 1, int cols = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
                                                                      ^
In file included from /in/exam3_matrix.cpp:9:0:
/in/compile/exam3_matrix.h:27:2: note: previous specification in 'intMatrix::intMatrix(int, int, int)' here
  intMatrix(int r = 1 , int c = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
  ^~~~~~~~~
/in/exam3_matrix.cpp:15:70: error: declaration of 'intMatrix::intMatrix(int, int, int)' outside of class is not definition [-fpermissive]
 intMatrix::intMatrix(int rows = 1, int cols = 1, int initialValue = 1); //TODO: Complete this construstor. 7Pts.
                                                                      ^
/in/exam3_matrix.cpp: In member function 'void intMatrix::saveTo(std::__cxx11::string)':
/in/exam3_matrix.cpp:66:22: error: no matching function for call to '_IO_FILE::_IO_FILE(std::__cxx11::string&)'
     FILE fin(fileName)
                      ^
In file included from /usr/include/stdio.h:41:0,
                 from /usr/include/c++/7/cstdio:42,
                 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 /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from /in/exam3_matrix.cpp:4:
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note: candidate: _IO_FILE::_IO_FILE()
 struct _IO_FILE {
        ^~~~~~~~
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note:   candidate expects 0 arguments, 1 provided
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note: candidate: constexpr _IO_FILE::_IO_FILE(const _IO_FILE&)
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note:   no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'const _IO_FILE&'
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note: candidate: constexpr _IO_FILE::_IO_FILE(_IO_FILE&&)
/usr/include/x86_64-linux-gnu/bits/libio.h:245:8: note:   no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to '_IO_FILE&&'
/in/exam3_matrix.cpp:67:1: error: expected ',' or ';' before '}' token
 }//TODO. 7Pts.
 ^

Information

Submit By
Type
Submission
Homework
Final Exam
Language
C++
Submit At
2022-08-02 15:39:35
Judged At
2022-08-06 15:13:44
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes