Do we need to include any header file in order to use swap() function
Swap() function
@sk1
it works with iostream headerfile, if you get an error you can import algorithm.
you can check these things yourself just by googling swap c++.
http://www.cplusplus.com/reference/algorithm/swap/