I need help pointing to a function/loop

Hey all! Still learning here and I think that is the right terminology.

So, basically, I am creating a fishing game/dice roller for my CS215 class. I am trying (albeit, I may be doing incredibly backward way of doing it) but I am trying to basically have the user input the word "cast" and by doing so, that will trigger the int "die" which is an array header file which will contain a die that rolls a random prize. So I think i do this through a loop that currently looks like below. The particular point I am looking at and confused with is the loop.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <cstdlib>
#include <string>
#include <ctime>
#include <die.h>
#include <score.h>

using namespace std;

int main()

{
int score
string choice
bool playAgain

  if (choice != "cast" && choice != "Cast" && choice != "CAST")
{      
      int die
}


and then I will follow that with an else statement that essentially terminates the program if anything else is entered. The int score is in there because the "game" will keep a tally, but I believe I know how to do that part later.
To generate a random number do this:
1
2
srand( time( NULL ) );
int rand_num = rand( ) % 6 + 1; // 1 ≤ rand_num ≤ 6 

http://www.cplusplus.com/reference/cstdlib/rand/
Topic archived. No new replies allowed.