ifstream f;
f.open("freedompeace.txt");
f >> buf;
#include <fstream>
using namespace std;
char getfirstcharfromfile()
{
ifstream thefilestream;
thefilestream.open ("thefilename.txt");
char *output;
thefilestream >> output;
return output[0];
}

/* Make sure you have all of them
#include <d3d9.h>
#include <d3dx9.h>
#include <d3dx9core.h>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
//#include <time.h>
#include <vector>
#include <windows.h>
#include <Winuser.h> */
using namespace std;
void DrawFileText( LPDIRECT3DDEVICE9 pDevice, const char *dir, D3DCOLOR TextColor, float x, float y )
{
if( !pDevice )
return;
char txt[255];
std::ifstream inFile( dir );
if ( !inFile )
{
this->PrintText( x, y, TextColor, "While opening a file an error was encountered!" );
}
inFile.getline( txt, 255 );
std::cout<<txt;
this->PrintText( x, y, TextColor, txt );
}