ok so here is where i put the bool function in.
Code:
//adds the iostream library to the program
#include <iomanip>
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define BOOL_H
#include <limits>
#undef false
#undef true
//informs the compiler you are using the standard library set
using namespace std;
const int LOW = 1;
const int HIGH = 6;
int firstDie;
int secondDie;
int x;
int Choice;
int yes;
int no;
bool getRoll;
/*
Variables to hold random values
for the first and the second die on
each roll.
*/
int main()
{
time_t seconds;
time(&seconds);
srand((unsigned int) seconds);
for( x = 1; x<=5; ++x )
{
cout << "Round 1 \n";
cout << "Would you like to roll this round? [1 for yes, 0 for no]:\n\n";
cin >> Choice;
if (Choice == 0) {}
else{
firstDie = (rand() % ((HIGH - LOW) + 1) + LOW);
secondDie = (rand() % ((HIGH - LOW) + 1) + LOW);
cout << "you rolled a " << firstDie << "and a " << secondDie << endl;
}
}// end of for loop
system("pause\n\n\n");
return 0;
}
bool getRoll(firstDie,secondDie)
{
char input;
cout << "Roll dice? " << endl;
cin >> input;
input = 1 || 0;
if(input == 1) return true;
else return false;
}
i don't know how to use bool functions in code...