What is the best way to pass an instance of a class myclass[7] to a function as an arguement?