Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to set elements on an array

+1 vote
asked Oct 30, 2021 by Kassandra Tovar (130 points)
here is my current code: https://onlinegdb.com/hzp_dkUcL

this program is for a connect 4 game. I am having trouble setting the game pieces on the array based on user input.

1 Answer

+1 vote
answered Oct 30, 2021 by Peter Minarik (86,740 points)

From your code:

board[row][col] = symbol[player]

That's exactly how you set an element in an array.

So what are you after?

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...