In the code above, both the functions are too stressed.
You want functions to do as little as possible. Let them do one thing and one thing only. The warning message doesn't belong in "add_it()" so I moved it out of the function and place it somewhere else. The second function is trickier. Using the for-loop to loop through arrays for display reasons. Such a loop doesn't belong in a class that you are currently developing. So my original function was way too stressed as well: it did too much. Instead, lets split it up. Now we have a function that is responsible for fetching the element and one function needs to be written to control the display. And the latter surely doesn't belong in your class later. Perhaps a different "console_view" class or to keep it simple in simple cases, in "main()".
Code:
#include <iostream>
#include <cstddef>
using namespace std;
int add_it(const int a, const int b)
{
return a+b;
}
int get_element(int* array, unsigned idx)
{
return array[idx];
}
int main()
{
std::cout << "Start Calculating."<<endl;
std::cout << add_it(4,3) << std::endl;
return 0;
}
Now observe YOUR code that you were making for redhead. You'll be able to be your own judge for a gread deal now. Make the changes and then finalize redhead's homework. Make him proud and never say I was here

.
P.S.
You want functions to do as little as possible.