Record Detail

Compile Error

/in/cleaner.cpp:131:68: error: addition of default argument on redeclaration makes this constructor a default constructor
        Latex::CommandResolver::CommandResolver(const std::string &latexCode = "")
                                                                   ^           ~~
/in/cleaner.cpp:62:13: note: previous declaration is here
            CommandResolver(const std::string &latexCode);
            ^
/in/cleaner.cpp:309:90: error: non-constant-expression cannot be narrowed from type 'std::streamoff' (aka 'long') to 'std::string::size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
                        this->mCommandInfoParsingStack.push(new Latex::Function{cmdName, backslashPosition, static_cast<std::size_t>(this->mCodeIstrm.tellg()) + 1, true,0});
                                                                                         ^~~~~~~~~~~~~~~~~
/in/cleaner.cpp:309:90: note: insert an explicit cast to silence this issue
                        this->mCommandInfoParsingStack.push(new Latex::Function{cmdName, backslashPosition, static_cast<std::size_t>(this->mCodeIstrm.tellg()) + 1, true,0});
                                                                                         ^~~~~~~~~~~~~~~~~
                                                                                         static_cast<size_type>( )
/in/cleaner.cpp:315:92: error: non-constant-expression cannot be narrowed from type 'std::streamoff' (aka 'long') to 'std::string::size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
                        this->mCommandInfoResolvingStack.push(new Latex::Function{cmdName, backslashPosition, pos, false, pos});
                                                                                           ^~~~~~~~~~~~~~~~~
/in/cleaner.cpp:315:92: note: insert an explicit cast to silence this issue
                        this->mCommandInfoResolvingStack.push(new Latex::Function{cmdName, backslashPosition, pos, false, pos});
                                                                                           ^~~~~~~~~~~~~~~~~
                                                                                           static_cast<size_type>( )
/in/cleaner.cpp:334:62: error: non-constant-expression cannot be narrowed from type 'std::streamoff' (aka 'long') to 'std::string::size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
                                new Latex::Function{cmdName, backslashPosition, static_cast<std::size_t>(this->mCodeIstrm.tellg()) - 1, false, 0});
                                                             ^~~~~~~~~~~~~~~~~
/in/cleaner.cpp:334:62: note: insert an explicit cast to silence this issue
                                new Latex::Function{cmdName, backslashPosition, static_cast<std::size_t>(this->mCodeIstrm.tellg()) - 1, false, 0});
                                                             ^~~~~~~~~~~~~~~~~
                                                             static_cast<size_type>( )
4 errors generated.
/in/Compile/Makefile:44: recipe for target 'buildCleaner' failed
make: *** [buildCleaner] Error 1

Information

Submit By
Type
Submission
Homework
Project Five: List, Stack, and Queue
Language
C++
Submit At
2020-12-16 23:55:04
Judged At
2020-12-16 23:55:04
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes