o thanks man
u guys must know a lot about loops.
Type: Posts; User: findme
o thanks man
u guys must know a lot about loops.
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
int x = 0;
int i;
for (i = 1; i <= 100; i++){
o thanks for that man. i get it now.
no actually i don't. i just need little tips. not someone to do my homework.
ok so change
bool getRoll(firstDie,secondDie)
{
char input;
cout << "Roll dice? " << endl;
cin >> input;
input = 1 || 0;
if(input == 1) return true;
int getDice()
I am trying to write a function to return the value of a thrown dice. the function will return the dice value, a number between 1 and 6.
i know you use the srand and the rand...
int getTurn(int input)
ok im trying to write a function that throws the dice and tells the player the results and adds up the total score. This function will have the old score as the input and...
ok so here is where i put the bool function in.
//adds the iostream library to the program
#include <iomanip>
#include <iostream>
#include <cstdlib>
ok my function will be bool getRoll ()
im trying to write a function that will ask the user if they would like to roll for a particular round. The user can input ANY character but only a '1'...
yawn read my question atthe top of your post then look at your answer....
ok but how do you make the code when a person enters 0 or anything other than 1 repeat?
"Would you like to roll this round? [1 for yes, 0 for no]:\n\n";
also your code doesn't help either because when i use it makes me do the samething i had before which would make it only work with if a person enters 0 then it will repeat the same statement over......
Daved i can use this one because this one doesn't actually do what i need it to do. although it has the clear values i need it to repeat the message over and i can't find a code like that yet.
you need to call the fighter_array to use the function.
ok well here is my problem. my code is doing the exact opposite i want it to do. it is saying when a person enters a 1 or anything else other than a 0 it will show up as a the person rolled but i...
yawn i got it.
//adds the iostream library to the program
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define BOOL_H
so how do you make a the program pick a random number between 1 trough 8 like and cout both of the die?
yes that is part of what i wanted to do but i need tomake it so that
if a person enters anything else ( like A,0,2,3,5,35)but a 1
then
//cout << "Would you like to roll this round? [1 for...
any ideas?
fundementals in c++ introductory book. but i think most anyone would agree any book that has intro to c++ would help you.
where do you put that? in int main?
anyone got any answers to this annoying problem?
wow. i learned something new today... thanks a lot!
i get a problem that when you enter 0 you get 2 lines saying the same thing. how do i get rid of one of the lines?
//adds the iostream library to the program
#include <iostream>
//adds...
ok my question is if a person in used my code and pressed 0 to not roll how do you repeat it again until the user enters 1 for yes?
//adds the iostream library to the program
#include...