no match for operator?

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Nyap, May 23, 2016.

  1. Nyap
    OP

    Nyap HTML Noob

    Banned
    973
    344
    Jan 13, 2016
    That Chaos Site
    why doesn't this code work (not finished it yet btw, I just want to know why I'm getting compile errors)
    Code:
    #include <iostream>
    
    using std::cout;
    using std::cin;
    
    struct point
    {
      bool circlex; //0=O, 1=X
      bool isempty;
    };
    
    void render(point points)
    {
      int line{1};
      int across{0};
      while (across<9)
      {
      if (!(line % 2))
      {
      cout << "######\n";
      ++line;
      continue;
      }
    
      if (points[across].isempty==1)
      {
      cout << " ";
      }
      else if (points[across].circlex==0)
      {
      cout << "O";
      }
      else if (points[across].circlex==1)
      {
      cout << "X";
      }
    
      if (across==1 || across==2)
      {
      cout << "#";
      }
      ++across;
      }
    }
    
    int main()
    {
      point tictactoe[9];
      render(tictactoe);
    }
    
     
    Last edited by Nyap, May 23, 2016