title: Getting errors when trying to compile program using boost and ncurses libraries
body: <p>I have just started to write a server and client for an assignment but can't get my client code to compile. The server compiles just fine using just the boost library but in my client code I am using boost and ncurses. </p>
  
  <p>I am using <code>g++ battleship_client.cc -lboost_system -lncurses</code> when trying to compile.</p>
  
  <p>I have googled like crazy but I haven't found a solution. I should also note that I am on a mac and that I am using vscode. I have changed my includePath to look like this:</p>
  
  <pre><code>"includePath": [
              "${workspaceFolder}/**",
              "/usr/local/Cellar/boost/1.68.0_1/",
              "/usr/local/Cellar/ncurses/6.1/"
          ],
  </code></pre>
  
  <p>battleship_client.cc:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;ncurses.h&gt;
  #include &lt;boost/asio.hpp&gt;
  
  using namespace std;
  using boost::asio::ip::tcp;
  
  
  void draw_top_matrix(vector&lt;vector&lt;int&gt; &gt; &amp;board, int cur_row, int cur_col) {
      for (int j=0;j&lt;4;j++) {
          move(0,2*j);
          printw("+-");
      }
  
      move(0,2*4);
      printw("+");
  
      for (int i=0;i&lt;4;i++) {
          for (int j=0;j&lt;4;j++) {
              move(2*i+1,2*j);
              printw("|");
              move(2*i+1,2*j+1);
  
              if (board[i][j] == 0) {
                  printw(" ");
              } 
              else {
                  printw("X");
              }
          }
  
          move(2*i+1,2*4);
          printw("|");
  
          for (int j=0;j&lt;4;j++) {
              move(2*i+2,2*j);
              printw("+-");
          }
  
          move(2*i+2,2*4);
          printw("+");
      }
  
      move(2*cur_row+1,2*cur_col+1);
  }
  
  void init(vector&lt;vector&lt;int&gt; &gt; &amp;board) {
      int rows;
      int cols;
      int cur_row = 0;
      int cur_col = 0;
  
      for(int i = 0; i &lt; 4; i++) {
          vector&lt;int&gt; temp;
          for(int j = 0; j &lt; 4; j++) {
              temp.push_back(0);
          }
          board.push_back(temp);
      }
  
      initscr();
      clear();
  
      getmaxyx(stdscr, rows, cols);
  
      cbreak();
      keypad(stdscr, TRUE);
      refresh();
  
      draw_top_matrix(board, 0, 0);
      endwin();
  }
  
  int main(int argc, char *argv[]) {
      int port = atoi(argv[3]);
      vector&lt;vector&lt;int&gt; &gt; board;
      boost::asio::io_service my_service;
      tcp::resolver resolver(my_service);
  
      tcp::socket socket(my_service);
      socket.connect(tcp::endpoint(boost::asio::ip::address::from_string(argv[2]), port));
  
      init(board);
  
      return 0;
  }
  </code></pre>
  
  <p>The errors I am getting:</p>
  
  <pre><code>    In file included from battleship_client.cc:4:0:
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp:595:7: error: 'stdscr' is not a type
     int timeout() const
         ^
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp:595:7: error: expected identifier before ')' token
     int timeout() const
         ^
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp: In member function 'std::basic_streambuf&lt;char&gt;::int_type boost::asio::basic_socket_streambuf&lt;Protocol, Clock, WaitTraits&gt;::underflow()':
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp:479:42: error: expected primary-expression before ')' token
               socket().native_handle(), 0, timeout(), ec_) &lt; 0)
                                            ^
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp: In member function 'std::basic_streambuf&lt;char&gt;::int_type boost::asio::basic_socket_streambuf&lt;Protocol, Clock, WaitTraits&gt;::overflow(std::basic_streambuf&lt;char&gt;::int_type)':
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp:538:42: error: expected primary-expression before ')' token
               socket().native_handle(), 0, timeout(), ec_) &lt; 0)
                                            ^
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp: In member function 'void boost::asio::basic_socket_streambuf&lt;Protocol, Clock, WaitTraits&gt;::connect_to_endpoints(EndpointIterator, EndpointIterator)':
  /usr/local/include/boost/asio/basic_socket_streambuf.hpp:656:39: error: expected primary-expression before ')' token
               socket().native_handle(), timeout(), ec_) &lt; 0)
  </code></pre>