I have been trying for hours to get this thing to work. Im trying to put a little pause in the middle of some text so it doesn't all come at once. It just skips past the pause instead of waiting for the user to press enter.
Here are the files:
main.cpp
library.hCode:#include "library.h"
void main ()
{
int choice (0);
while(choice != 3)
{
cout << "\n\n\n\n";
cout << "********************\n";
cout << "** Project Waya **\n";
cout << "********************\n";
cout << "** 1: Play **\n";
cout << "** 2: Load **\n";
cout << "** 3: Exit **\n";
cout << "********************\n\n\n";
cout << ">";
cin >> choice;
cout << "\n\n\n";
switch(choice)
{
case 1:
prelude();
break;
case 2:
//hmmm....
break;
}
}
cout << "Thank you for playing Waya. Please play again soon!\n\n";
}
prelude.cppCode:#include <iostream>
using namespace std;
//Protoypes
bool prelude();
bool home();
void wait();
wait.cppCode:#include "library.h"
bool prelude()
{
cout << "Your eyes slowly slide open. You start to wonder what all the commotion in the\n";
cout << "village is about. Not that the commotion is that out of place, after all in two\n";
cout << "days you will be fifteen and that of course means everyone in the village will\n";
cout << "consider to be a man, which means there will be a huge celebration and an even\n";
cout << "bigger feast. 'They are probably just decorating for the party... but at night?'";
cout << "you thought to yourself.\n\n";
cout << "Just as you turn over and close your eyes you hear a scream. Your eyes jolt open";
cout << "and you see a huge dark silhouette stand over you. Before you can react you get\n";
cout << "punched right in your temple, your vision goes blurry and you loose\nconsciousness.\n\n";
wait();
home();
return true;
}
Thanks in advance,Code:#include "library.h"
void wait()
{
cout << "Press enter to continue.\n";
cin.ignore;
}
Lore

