# Question; C++ Ping Pong

**URL:** <https://discourse.codecombat.com/t/question-c-ping-pong/37347>\
**Category:** Uncategorized\
**Created:** [April 12, 2024, 11:50pm UTC](https://discourse.codecombat.com/t/question-c-ping-pong/37347 "2024-04-12T23:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tryn4x](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@tryn4x](https://discourse.codecombat.com/u/tryn4x)\
**Post date:** [April 12, 2024, 11:50pm UTC](https://discourse.codecombat.com/t/question-c-ping-pong/37347/1 "2024-04-12T23:50:39Z")

</div>

Hello  
In lvl PingPong…

why does the argument “Fetch” continue to execute outside the while loop? The cat runs after the “ball” even though it is not included in the while loop!

```python
int main() {
        hero.say("fetch");
        while(true) {
            hero.attack("ball2");
            hero.moveRight(3);
            hero.attack("ball2");
            hero.moveLeft(3);
        }
    return 0;
}

```

is my post in the wrong place?  
Im very sry

thx

---

<div class="post-metadata">

**Author:** ![A.Lee452](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/a.lee452/32/43613_2.png) [@A.Lee452](https://discourse.codecombat.com/u/A.Lee452)\
**Post date:** [April 13, 2024, 1:07am UTC](https://discourse.codecombat.com/t/question-c-ping-pong/37347/2 "2024-04-13T01:07:48Z")

</div>

Hi @tryn4x! Welcome to the CodeCombat Discourse! This is a safe place to chat and ask for level help. Before you begin your journey, could you please go through our [rules](https://discourse.codecombat.com/t/welcome-to-codecombat-discourse-forums/15601/1) that make this discourse an awesome place? It helps us all 😁 We hope you enjoy your stay!!

Could you also show us your code and format it correctly? You can learn how to format it [here](https://discourse.codecombat.com/t/how-to-post-your-code-with-radiant-harmonious-formatting/1484).
