N rotations of an array, either left or right, and then printing the result
There are two basic ways to solve this type of problem.  One is having to do the rotation in place, where you can't allocate additional storage for a copy of the array.  This uses less memory but takes longer, since the rotations have to go by small increments (usually 1, since that is easiest to implement).  The other way is to do the rotation into a copy.  This has the advantage of being faster but can take additional memory.  Your implementation is a hybrid of both.

Don't write using namespace std;.

You're passing all your vectors by value, which will result in copies being made.  Since you're making a new vector to store the rotated vector in, you can pass them by const &amp;.  For example,

std::vector&lt;int&gt; rotate(const std::vector&lt;int&gt; &amp;myVector, int direction);


print can take advantage of range based for loops:

void print(const vector&lt;int&gt; &amp;rotatedVector) {
    for (int v: rotatedVector){
        std::cout &lt;&lt; v &lt;&lt; '\n';
    }
}


This also avoids using endl, since that will do a flush which can greatly slow the rate output is displayed.

Your two parameter rotate function can rotate by more than one element at a time.  You can combine the two rotate functions into one, with an offset of -direction * count instead of -direction.  (With appropriate code to precalculate that value and a check so that the result is not larger than -length to avoid having a negative number on the left of %.)