outputarray.cpp working