Advertisement
fteussh

coder_1.1.

Oct 28th, 2015
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <cstdio>
  4. #include <stdio.h>
  5.  
  6. using namespace std;
  7.  
  8. void f_encode () {
  9.  cout << "Function for encoding file" << endl;
  10. }
  11.  
  12. void f_decode () {
  13.  cout << "Function for decoding file" << endl;
  14. }
  15.  
  16.  
  17. int main (int argc, char **argv) {
  18.  
  19.   if (argv[1] != NULL) {
  20.     if (strcmp(argv[1], "encode") == 0) {
  21.     cout << "Encode mode enabled!" << endl;
  22.     } else {
  23.     if (strcmp(argv[1], "decode") == 0) {
  24.         cout << "Decode mode enabled!" << endl;
  25.     } else {
  26.     cout << "You shall not pass! What the " << argv[1] << "????" << endl;
  27.     }
  28.     }
  29.   } else {
  30.     cout << "What do you mean by saying it..?" << endl;
  31.   }
  32.    
  33.    if (argv[2] != NULL) {
  34.      
  35.      FILE * file_object;
  36.      file_object = fopen (argv[2], "r");
  37.       if (file_object != NULL)
  38.       {
  39.     cout << "it`s success!!1111!!11azaza" << endl;
  40.       } else {
  41.     cout << "what the shit?" << endl;
  42.       }
  43.      
  44.      fclose (file_object);
  45.      
  46.    }
  47.    
  48.  
  49.   return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement