prog.cpp: In function 'void printList(const Node*)':
prog.cpp:10:45: error: 'nullptr' was not declared in this scope
for (const Node *wsk = head; wsk != nullptr; wsk = wsk->next){
^
prog.cpp:11:17: error: 'cout' was not declared in this scope
cout << wsk->data << " ";
^
prog.cpp:11:17: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
prog.cpp: In function 'void add(Node*&, int)':
prog.cpp:19:31: error: 'nullptr' was not declared in this scope
toAdd->next = nullptr;
^
prog.cpp:31:39: error: 'nullptr' was not declared in this scope
for (wsk = head; wsk->next != nullptr; wsk = wsk->next){
^
prog.cpp:40:23: error: 'nullptr' was not declared in this scope
toAdd->next = nullptr;
^
prog.cpp: At global scope:
prog.cpp:43:28: error: 'function' has not been declared
bool any(const Node* head, function<bool(int)> pred) {
^
prog.cpp:43:36: error: expected ',' or '...' before '<' token
bool any(const Node* head, function<bool(int)> pred) {
^
prog.cpp: In function 'bool any(const Node*, int)':
prog.cpp:44:45: error: 'nullptr' was not declared in this scope
for (const Node *wsk = head; wsk != nullptr; wsk = wsk->next){
^
prog.cpp:45:35: error: 'pred' was not declared in this scope
if (pred(wsk->data)) return true;
^
prog.cpp: At global scope:
prog.cpp:50:28: error: 'function' has not been declared
bool all(const Node* head, function<bool(int)> pred) {
^
prog.cpp:50:36: error: expected ',' or '...' before '<' token
bool all(const Node* head, function<bool(int)> pred) {
^
prog.cpp: In function 'bool all(const Node*, int)':
prog.cpp:51:45: error: 'nullptr' was not declared in this scope
for (const Node *wsk = head; wsk != nullptr; wsk = wsk->next){
^
prog.cpp:52:36: error: 'pred' was not declared in this scope
if (!pred(wsk->data)) return false;
^
prog.cpp: In function 'void deleteList(Node*&)':
prog.cpp:58:39: error: 'nullptr' was not declared in this scope
for (Node *wsk = head; wsk != nullptr;){
^
prog.cpp:60:17: error: 'cout' was not declared in this scope
cout << "Del: " << wsk->data << " ";
^
prog.cpp:60:17: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
prog.cpp:64:16: error: 'nullptr' was not declared in this scope
head = nullptr;
^
prog.cpp: In function 'int main()':
prog.cpp:74:9: error: 'cout' was not declared in this scope
cout << std::boolalpha;
^
prog.cpp:74:9: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.9/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^
prog.cpp:76:63: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
<< all(head, [](int i) -> bool {return i< 10; })
^
prog.cpp:76:64: error: invalid user-defined conversion from 'main()::<lambda(int)>' to 'int' [-fpermissive]
<< all(head, [](int i) -> bool {return i< 10; })
^
prog.cpp:76:43: note: candidate is: main()::<lambda(int)>::operator bool (*)(int)() const <near match>
<< all(head, [](int i) -> bool {return i< 10; })
^
prog.cpp:76:43: note: no known conversion from 'bool (*)(int)' to 'int'
prog.cpp:77:20: error: 'endl' was not declared in this scope
<< endl;
^
prog.cpp:77:20: note: suggested alternative:
In file included from /usr/include/c++/4.9/iostream:39:0,
from prog.cpp:1:
/usr/include/c++/4.9/ostream:564:5: note: 'std::endl'
endl(basic_ostream<_CharT, _Traits>& __os)
^
prog.cpp:79:68: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
<< all(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:79:69: error: invalid user-defined conversion from 'main()::<lambda(int)>' to 'int' [-fpermissive]
<< all(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:79:43: note: candidate is: main()::<lambda(int)>::operator bool (*)(int)() const <near match>
<< all(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:79:43: note: no known conversion from 'bool (*)(int)' to 'int'
prog.cpp:82:68: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
<< any(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:82:69: error: invalid user-defined conversion from 'main()::<lambda(int)>' to 'int' [-fpermissive]
<< any(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:82:43: note: candidate is: main()::<lambda(int)>::operator bool (*)(int)() const <near match>
<< any(head, [](int i) -> bool {return i % 2 == 0; })
^
prog.cpp:82:43: note: no known conversion from 'bool (*)(int)' to 'int'