Declare the variables you need in a function, inside that function. You don't need to try and borrow variables from main if that's what your plan was.

Or perhaps your plan was to call it three...