1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

2d arrays inside 2d arrays in c++

Discussion in 'Off Topic' started by ObamaTheReptile, Sep 21, 2016.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. ObamaTheReptile

    ObamaTheReptile Well-Known Member

    Joined:
    Nov 1, 2013
    Messages:
    3,630
    Ratings:
    +664
    I'm coding an ultimate tic-tac-toe* game in c++ (Microsoft Visual Studio), but I've encountered a problem.
    To make it work, I've made nine 2d string arrays, one for each square in the larger grid; and one 2d string array for the large board. My plan is to make, for example board[1][3] = botLeftGrid; but you can't set places in an array to entire arrays in c++. Am I doing this wrong, or is it just not possible to do this this way? Or would it be easiest just to make a function that returns a string value based on the inputs?

    *All you need to understand is that there are tic-tac-toe grids in each of the nine squares of a larger tic-tac-toe grid.
     
  2. MR_naenae_1738

    Joined:
    Mar 24, 2014
    Messages:
    935
    Ratings:
    +164
  3. ObamaTheReptile

    ObamaTheReptile Well-Known Member

    Joined:
    Nov 1, 2013
    Messages:
    3,630
    Ratings:
    +664
Loading...
Similar Threads Forum Date
Complete Opposites Inside Map Submissions Apr 1, 2020
Denied Windows_Insiders Staff Application Denied Jul 26, 2019
Kiting inside of spawn Raid Jun 7, 2017
Druglords and mobs inside cartels Ideas Aug 25, 2016
Bug Getting Killed Inside Towns Wild West May 30, 2016
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...