1. as others have mentioned <stdio.h> is a C header, not a C++ header.
2. std::cout is part of the <iostream> header.
3. can't define a non lamba function within another function. main is a function.
4. a function can only return one value, not two. need 2 (or more) values returned, pass variables to hold the values as references or pointers, and the function return type should be changed to void.
5. your for loop at line 8 is ill-formed, your condition part (i > arrSize) is wrong.
Passing a C++ container, such as a std::vector, is easier since the container retains its size. A vector's size can be retrieved using the std::vector::size member function. http://www.cplusplus.com/reference/vector/vector/size/