You got yourself into a name conflict. usingnamespace std;
There is already a name 'ws' in the std namespace
( http://www.cplusplus.com/reference/iostream/manipulators/ws/ )
Either rename the ws variable, or even better: don't use usingnamespace std;.