ls.cpp recrecognizes flags and stores them in int array