A bug for C++ in Pong Pong

One of the goals is to complete the level in under six lines.
It is indeed doable in Python, Javascript, or Coffeescript.
However, I’m using C++, and apart from the commanding code, you’ll need one more line: void(main). So the least amount of lines of code you can use is 7, not six.
Btw here is my code:

void main() {
    hero.say("fetch");
    while(true) {
        hero.attack("ball2");
        hero.moveRight(3);
        hero.attack("ball2");
        hero.moveLeft(3);
    }
}

All of the 30 lines, 9 lines, and 6 lines of code or less should be turned into 31, 10, and 7 lines of code or less when the player is using C++.
~ Orb
(also I was messing around and made this +_= wink wink)

@Chaboi_3000 (20 char)

I think those might be optional goals