title: What does fd represent when typing: int fd = open("file");?
body: <p>I am looking at I/O operations in C++ and I have a question.
  When opening a file like:</p>
  
  <pre><code>#include &lt;fcntl.h&gt;
  int main() {
      unsigned char buffer[16];     
      int fd = open (argv[1], O_RDONLY);
      read(fd, buffer, sizeof(buffer));
      return 0;
  }
  </code></pre>
  
  <p>How can the variable <code>fd</code> represent a file as an integer when passing it to the <code>open</code> method? Is it repesenting a file in current folder? If I print the ´fd´variable, it prints 3. What does that mean?</p>
  
  <p>Ps. I know there are several other ways to handle files, like stdio.h, fstream etc but that is out of the scope of this question. Ds.</p>