Advertisement
Nattack

Untitled

Mar 29th, 2018
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char* argv[]) {
  4.     FILE* fPtr = argc < 3 ? stdin : fopen(argv[2], "r");
  5.    
  6.     if (fPtr != (FILE*)stdin)
  7.         {fclose(fPtr);} // close if fPtr is not stdin.
  8.     return 0;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement