Calculate the sum of a series with a given accuracy
We're including the wrong headers.  We don't need &lt;cstring&gt;, but we do need &lt;cmath&gt; (for std::fabs).
Don't do this:

using namespace std;


That might not be so harmful in small programs, but it's a bad habit have because it makes larger programs more difficult to follow, and it increases the risk of identifier collisions, especially as the standard library continues to grow.
Never ignore the return value from std::system().  There are two uses of this function, and both of them are going to fail here, since I don't have either of the programs installed.  Is it right that they both create a file called nul?  Or did you just misspell /dev/null?
Never ignore the return value from stream-reading operations.  std::cin &gt;&gt; x leaves x uninitialised (before C++11) or zero (C++11 onwards) if it can't perform the conversion.
I don't think you wanted an integer as x anyway - shouldn't it be double?
Error messages should go to std::cerr, not std::cout.
Instead of multiplying i by 2 all the time, consider incrementing i in steps of 2.
The addition is being done in the wrong order.  When adding floating-point numbers, we want to accumulate the smallest values first, so as not to lose precision.
Instead of using the precision() function of a stream, consider using &lt;iomanip&gt;.  17 decimal digits of precision seems too large, given that the value of eps means we won't achieve 6 digits.
Don't use std::endl except when you genuinely need to flush the stream.  That unnecessarily slows programs down.

Here's a version that's modified to fix the above problems:
#include &lt;cmath&gt;
#include &lt;limits&gt;
#include &lt;iomanip&gt;
#include &lt;iostream&gt;
#include &lt;numeric&gt;
#include &lt;vector&gt;

// FIXME - make this a parameter
constexpr double precision = 0.000'001;

int main()
{
    double x;
    std::cin &gt;&gt; x;
    if (!std::cin) {
        std::cerr &lt;&lt; &quot;Invalid input\n&quot;;
        return 1;
    }

    if (std::fabs(x) &gt;= 1) {
        std::cerr &lt;&lt; &quot;The series is divergent above |x|=1\n&quot;;
        return 1;
    }

    std::vector&lt;double&gt; terms;
    double term = 1;
    for (auto i = 2ul;  std::fabs(term) &gt;= precision;  i += 2) {
        terms.push_back(term);
        term *= -x * (i + 3) / i;
        if (i &gt; std::numeric_limits&lt;decltype(i)&gt;::max() - 2) {
            // overflow
            break;
        }
    }
    // add smallest terms first
    auto sum = std::accumulate(terms.crbegin(), terms.crend(), 0.0);

    std::cout &lt;&lt; std::setprecision(7) &lt;&lt; &quot;sum=&quot; &lt;&lt; sum &lt;&lt; '\n';
}


As suggested by greybeard in comments, the way the function converges means we can get a good estimate of the rest of the series by halving the last term that we consider, and we can terminate when the sum of two consecutive elements is within our precision value:
std::vector&lt;double&gt; terms;
double term = 1;
std::size_t i = 2;
do {
    terms.push_back(term);
    term *= -x * (i + 3) / i;
    i += 2;
} while (std::abs(term + terms.back()) &gt;= precision);

// term/2 is a good approximation to the rest of the series
terms.push_back(term / 2);