Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 28th, 2011  |  syntax: C++  |  size: 0.50 KB  |  views: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <cstdio>
  2. #include <cstdlib>
  3. #include <string>
  4. #include <iostream>
  5. #include <fstream>
  6.  
  7. using namespace std;
  8.  
  9. int main(){
  10.     FILE * pFile;
  11.         string a;
  12.         cout << "Program is predefined... \n";
  13.         cout << "Input: ";
  14.         cin >> a;
  15.         pFile = fopen ("Personal Shop Codes.txt","a+");                
  16.         for( int i = 0; i < a.size(); i++ )
  17.          {  
  18.           fprintf(pFile, "%hX ", a[i]);
  19.          }
  20.         cout << endl;  
  21.     fclose (pFile);      
  22.     cout << "Done! Check your file \n";
  23.         return 0;
  24. }
clone this paste RAW Paste Data