Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 5.4.0

Options
Warnings
Boost 1.68.0
C++11
no pedantic

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-5.4.0/include -std=c++11
prog.cc: In member function 'void ListNode::printAllNodes()':
prog.cc:13:9: error: 'string' was not declared in this scope
         string nodeString = "LinkedList: ";
         ^
prog.cc:21:13: error: 'nodeString' was not declared in this scope
             nodeString = nodeString + " -> ( " + std::to_string(x) + " ) ";
             ^
prog.cc:21:50: error: 'to_string' is not a member of 'std'
             nodeString = nodeString + " -> ( " + std::to_string(x) + " ) ";
                                                  ^
prog.cc:25:9: error: 'cout' was not declared in this scope
         cout << nodeString << endl;
         ^
prog.cc:25:17: error: 'nodeString' was not declared in this scope
         cout << nodeString << endl;
                 ^
prog.cc:25:31: error: 'endl' was not declared in this scope
         cout << nodeString << endl;
                               ^
prog.cc: In member function 'ListNode* Solution::addTwoNumbers(ListNode*, ListNode*)':
prog.cc:72:13: error: 'cout' was not declared in this scope
             cout << "sum is " << sum << " with carry of " << carry << endl;
             ^
prog.cc:72:71: error: 'endl' was not declared in this scope
             cout << "sum is " << sum << " with carry of " << carry << endl;
                                                                       ^
prog.cc:76:13: error: 'cout' was not declared in this scope
             cout << "sum is " << sum << endl;
             ^
prog.cc:76:41: error: 'endl' was not declared in this scope
             cout << "sum is " << sum << endl;
                                         ^
prog.cc: In function 'void proveBasicCase()':
prog.cc:107:5: error: 'cout' was not declared in this scope
     cout << "\n\nBasic case\n";
     ^
prog.cc: In function 'void proveListSizeNotEqual()':
prog.cc:140:5: error: 'cout' was not declared in this scope
     cout << "\n\nUneven List sizes\n";
     ^
prog.cc: In function 'void proveDoubleCarry()':
prog.cc:171:5: error: 'cout' was not declared in this scope
     cout << "\n\nDouble Carry\n";
     ^
prog.cc: In function 'int main()':
prog.cc:197:16: error: 'std::cout' has not been declared
     using std::cout;
                ^
prog.cc:198:16: error: 'std::endl' has not been declared
     using std::endl;
                ^
prog.cc:200:5: error: 'cout' was not declared in this scope
     cout << "Mr Robot is running prgm..." << endl;
     ^
prog.cc:200:46: error: 'endl' was not declared in this scope
     cout << "Mr Robot is running prgm..." << endl;
                                              ^
Exit Code:
1