Hunting Party [c++] help

----> auto friends = hero.findFriends[i];

Wait. Hold on.
Let me try to explain you this.
In the beginning, where you have auto friends = hero.findFriends(); it means that you call the hero.findFriends() array with one word: friends.
After for, you have auto friend = friends[i], or it could be hero.findFriends()[i], which gives you one friend, not an array. And after this, you command one friend to attack the enemy.

1 Like

but the ERORR is while(true) {

Did you do everything I said? Can you show me a screenshot of the error?

1 Like

You did nothing I said. Please check my previous messages.

1 Like

give some hint i donā€™t understand

Here
Or do you still not understand?

1 Like

where the hint?(20charter)

In my message.

1 Like

i dont understand that hint

Did you solve previous levels in the Mountain?

1 Like

yes(20cweyuaweawejhawyuehawe)

Okay. So, after the while true, the next line, it should be auto friends = hero.findFriends();.
in the line after for (int i = 0; i < sizeof friends / sizeof friends[0]; i++) { it should be auto friend = friends[i];.

1 Like

oh like this
auto friend = hero.findFriends[i];

No. like this: auto friends = hero.findFriends();
I literally just wrote that in my previous messageā€¦

1 Like

auto friends = hero.findFriends();

Yes! Exactly. This should be after While true

1 Like

still erorr same erorr

Did you paste it in the correct place?
Can you show me a screenshot of the error again?

1 Like