title: Compile error (error: expected ‘;’, ‘,’ or ‘)’ before ‘{’ token)
body: <p>I write a network.h and network.c file. When I compile it with gcc. It show a strange 
  error.</p>
  
  <pre><code>gcc -o network.o -c network.h
  
  network.c:14: error: expected ‘;’, ‘,’ or ‘)’ before ‘{’ token
  </code></pre>
  
  <p>The code try to send message through socket.</p>
  
  <p>This is the header file.</p>
  
  <p>network.h</p>
  
  <pre><code>#ifndef _NETWORK_H_
  #define _NETWORK_H_
  
  int open_tcp(char* host, int port);
  int nsend(int sock_fd, char* buffer, int num);
  int nrecv(int sock_fd, char* buffer, int num;
  int recv_line();
  int close(int socket_fd);
  
  #endif
  </code></pre>
  
  <p>This is the part of implements.</p>
  
  <p>network.c </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;string.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;sys/socket.h&gt;
  #include &lt;netinet/in.h&gt;
  #include &lt;netdb.h&gt; 
  #include &lt;stdlib.h&gt;
  #include "network.h"
  
  #define BUFFER_SIZE 300000
  
  int open_tcp(char* host, int port)
  {
      int sockfd, n;
      struct sockaddr_in serv_addr;
      struct hostent *server;
  
      sockfd = -1;
      char buffer[BUFFER_SIZE];
      sockfd = socket(AF_INET, SOCK_STREAM, 0);
      if (sockfd &lt; 0) 
          error("ERROR opening socket");
      server = gethostbyname(host);
      if (server == NULL) {
          fprintf(stderr,"ERROR, no such host\n");
          exit(0);
      }
      bzero((char *) &amp;serv_addr, sizeof(serv_addr));
      serv_addr.sin_family = AF_INET;
      bcopy((char *)server-&gt;h_addr, 
           (char *)&amp;serv_addr.sin_addr.s_addr,
           server-&gt;h_length);
      serv_addr.sin_port = htons(port);
      if (connect(sockfd,(struct sockaddr *) &amp;serv_addr,sizeof(serv_addr)) &lt; 0) 
          error("ERROR connecting");
      return sockfd;
  }
  </code></pre>
  
  <p>Thank you for your help.</p>