I was wondering how you make a textin.dat file and change the
input to my txtOut.dat file? Here is my code below
// Character.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
cout << "Character Generator v1.0 - Programmed In C++
By: Rob" << "\n";
char Name[50], Class[50], Race[50];
cout << "Character Name: ";
cin>>Name;
cin.ignore();
cout << "Character Class: ";
cin>>Class;
cin.ignore();
cout << "Character Race: ";
cin>>Race;
cin.ignore();
cout << "Outputting To File..." << "\n";
ofstream a_file ( "Character.txt" );
a_file<<Name;
a_file<<"\n";
a_file<<Class;
a_file<<"\n";
a_file<<Race;
a_file.close();
ifstream b_file ( "txtOut.dat" );
cout << "Character Outputted To This Program's Directory."
<< "\n";
cout << "Press Enter To Exit...";
cin.get();
return 0;