Job 5:6-11 (AMP)6 For affliction comes not forth from the dust, neither does trouble spring forth out of the ground.7 But man is born to trouble as the sparks and the flames fly upward.8 As for me, I would seek God and inquire of and require Him, and to God would I commit my cause—9 Who does great things and unsearchable, marvelous things without number,10 Who gives rain upon the earth and sends waters upon the fields,11 So that He sets on high those who are lowly, and those who mourn He lifts to safety.
You can complain about something and you can pray about something. It really does not make sense to do both though. When we complain it is almost as if we do not believe God can help us in that situation.
We tend to ask God to change things in our lives but then we complain about the situation as if we do not believe God is working in our lives. Maybe instead of complaining we should be talking about the wonderful things God has done in our lives. The Devil wants us to focus on our trouble rather than what God can do. When we do that we are falling right into the trap of complaining.
We have situations that come in our lives so God can prepare us for what He has in store for our lives. Sometimes the preparation can be painful. But if we live and learn through the pain we will have strengthened our character. God deals with each and every one of us because He loves us so much and because He has great things in store for our lives but we have to mature some before He can give it to us.
Job 5:17 (AMP)17 Happy and fortunate is the man whom God reproves; so do not despise or reject the correction of the Almighty [subjecting you to trial and suffering].