title: How to fix the 'Debug Assertion Failed! Expression file_name != nullptr' error?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  int main(int argc, char *argv[])
  {
  FILE *source_fp, *content_fp;
  int ch;
  if(!(source_fp=fopen(argv[1],"wb")))
  {
      printf("can't open file\n");
      return 0;
  }
  
  for(int i = 2 ; i &lt; argc ; i++)
  {
      if(!(content_fp=fopen(argv[i],"r")))
          printf("can't find file%s\n", argv[i]);
      else
      {
          while(ch = fgetc(source_fp))
          {
              fputc(ch,source_fp);
          }
          fclose(content_fp);
      } 
  }
  fclose(source_fp);
  } 
  </code></pre>
  
  <p>I get the following error messages when running this program:</p>
  
  <pre><code>Debug Assertion Failed!
  
  Program: ...ments\Visual Studio 2015\Projects\Project9\Debug\Project9.exe File: minkernel\crts\ucrt\src\appcrt\stdio\fopen.cpp Line: 30
  
  Expression: file_name != nullptr
  
  For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
  
  (Press Retry to debug the application)
  </code></pre>
  
  <p>How do I fix this issue?</p>