prog.cpp: In function ‘int main()’:
prog.cpp:9:5: error: ‘cout’ was not declared in this scope
cout << "a = " << a << endl;
^~~~
prog.cpp:9:5: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/6/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
^~~~
prog.cpp:9:28: error: ‘endl’ was not declared in this scope
cout << "a = " << a << endl;
^~~~
prog.cpp:9:28: note: suggested alternative:
In file included from /usr/include/c++/6/iostream:39:0,
from prog.cpp:1:
/usr/include/c++/6/ostream:590:5: note: ‘std::endl’
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~
prog.cpp:14:14: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
swap(a, b);
^
prog.cpp:3:6: note: initializing argument 1 of ‘void swap(int*, int*)’
void swap(int *x, int *y);
^~~~
prog.cpp:14:14: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
swap(a, b);
^
prog.cpp:3:6: note: initializing argument 2 of ‘void swap(int*, int*)’
void swap(int *x, int *y);
^~~~
prog.cpp: In function ‘void swap(int*, int*)’:
prog.cpp:23:5: error: ‘cout’ was not declared in this scope
cout << "Hello" << endl;
^~~~
prog.cpp:23:5: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/6/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
^~~~
prog.cpp:23:24: error: ‘endl’ was not declared in this scope
cout << "Hello" << endl;
^~~~
prog.cpp:23:24: note: suggested alternative:
In file included from /usr/include/c++/6/iostream:39:0,
from prog.cpp:1:
/usr/include/c++/6/ostream:590:5: note: ‘std::endl’
endl(basic_ostream<_CharT, _Traits>& __os)
^~~~