Thanks for the answers.
Elysia, thanks for that, but since this project is mainly for learning purposes, I'm going to do nothing with libraries. However, I'm planning on rewriting the game with the same story with libraries and graphics, after it's done.
Anyway, I've tried to make it work, i almost did. But I'm stuck on the getline(); thing. I've read two tutorials about getline(). One of them, however, had two mistakes in the code, lol.
Anyway, I cannot get it work, at least at the moment. Here's the code:
There's an error to the dot in here: b_file.getline(str, 1);. b_file. <--- this dot.
using namespace std;
int file = 1;
int file1 = 2;
int file2 = 3;
//Creates an instance of ofstream, and opens example.txt
ofstream a_file ( "example.txt" );
// Outputs to example.txt through a_file
a_file << file1;
a_file << file2;
// Close the file stream explicitly
//Opens for reading the file
ifstream b_file ( "example.txt" );
//Reads one string from the file
//Should output 'this'
cout<< str <<"\n";
cin.get(); // wait for a keypress
// b_file is closed implicitly here
What I'm trying to do, is appoint each line to a variable. The code, is going to be like this (as i understand it should be now):
int quest1completed = 1; // or true.
int quest2completed = 0; // or false.
/* the code to write it to two lines to the text file. */
/* the code to read the file. */
/* the code to make line one quest1completed's variable and second line - quest2completed's. */