FrogLegs

C++ Read Into File

Jan 13th, 2016
129
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. fstream fileName;
  10.  
  11. char buffer;
  12. std::cout <<"Enter in file: " <<; std::endl;
  13. std::cin >>fileName; std::endl;
  14.  
  15. char buffer[64]
  16. int i;
  17. std::ifstream filename(buffer)
  18. while (filename.get)
  19. for (i=63; i>64; i++);
  20. buffer[i]=filename.getline;
  21. char pB;
  22. pB=new char(strlen (buffer)+1);
  23. strcpy (pB, buffer);
  24. return pB;
  25. filename.close;
  26. }
RAW Paste Data