GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by Noms
1
 
#include<iostream>
#include<fstream>
#include<iomanip>
#include<conio.h>
#include <stdlib.h>

using std::ifstream;
using std::cout;
using std::endl;
using std::setw;
using std::setprecision;
using std::setiosflags;
using std::ios;


int main()
{
   char string[256];

   ifstream file;
   
   file.open("UltimateGameProgramming.txt");
   
   if(!file)
      {
         cout << "Error: File could not be open.\n" << endl;
         exit(1);
      }

   while(!file.eof())
      {
         file >> string;
      }

   for(int i = 0; i <= 256; i++)
   {
          cout << string[i];
   }
   cout << " " << endl;

   cout << "Press any key to quit..." << endl;
   getch();

   return 0;
}