Implementation of the UNIX command 'ls' in C++