title: How to set a socket option in C++ using setsockopt
body: <p>Still, having troubles with my code.</p>
  
  <pre><code>if (argc &gt; 0) {
  int route (argc);//[argc+1]
  ((char*) route)[0] = 1;
  ((char*) route)[1] = 2;//131
  ((char*) route)[2] = 3 + argc * 4;
  ((char*) route)[3] = 4;
  for (int i = 0; i &lt; argc; i++) {
      route = inet_addr(argv[i]);
  }
  
  if (setsockopt(_socket.native_handle(), IPPROTO_IP, IP_OPTIONS, route, (argc + 1) * 4) &lt; 0) {
      perror("can't set socket option");
  }
  }
  </code></pre>
  
  <p>here's a part of it, keep getting this error C2664: cannot convert parameter 4 from 'int' to 'const char *'</p>