I want the program to read in a set of numbers from a file, increment each number by 1, then output to a different file. Can somebody please tell me what I am doing wrong? I am trying to use the function "doubler" to increment it by 1.
(1) Lines 55 and 74 should both be for (i=0; i<counter; i++)
(2) Scalar arguments in C++ are, by default, passed by value. This means that you can change element to your heart's content in line 92, but, as it stands, it won't get passed back.
Instead, if you want to retain a void function then pass element by reference by changing line 90 to void doubler(double &element)
and remember to change your function prototype in line 10 similarly.
(Alternatively, you could change the return type of the function to double and return this new value if you preferred.)
While you are at it, it would be good to change #include <math.h>
to the more modern #include <cmath>
(Not that you are actually using it yet.)