char grid[7][6]
Error: expression must have class type
Error 1 error C2228: left of '.begin' must have class/struct/union
Error 2 error C2228: left of '.end' must have class/struct/union
Error 3 error C2780: 'void std::replace(_FwdIt,_FwdIt,const _Ty &,const _Ty &)' : expects 4 arguments - 3 provided
4 IntelliSense: expression must have class type
5 IntelliSense: expression must have class type
Did a bit of research on replace();
It seems that you need to use a vector for the replace function.
You could split the array in colums and store them in vectors, but that would be a total mess and it's already giving me a headashe.
I think the easiest thing to do is just loop trough them or write a function to do that:
Yes, 'coder777' , that's what I tried to do , but the problem is that I am actually trying to make a connect 4 game, and every time it returns the P back to O again, so I'm trying to use replace instead so every time it outputs , the last time ver and hor were written doesn't get lost, I'm sorry if I am not clear, I hope you get what I mean.