Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want to print the dice number not the address. What am I doing wrong? Library.cpp I Console Shell 1 2 //expand this file to

image text in transcribed

I want to print the dice number not the address. What am I doing wrong?

Library.cpp I Console Shell 1 2 //expand this file to implement the functions defined in the library.h file #include "library.h" #include #include 3 4 5 clang++-7 -pthread -std=c++17 -o main library.cpp main..Q X 2./main Welcome to the knock-out game. How many rounds of rolling would you like to have? 2 Round 1 Rolls: Oxbf4690 Round 2 Rolls: Oxbf4698 6 using namespace std; 7 8 9 10 void roll (Dice* one) { unsigned roll1=rand(%6+1; unsigned roll2=rand (%6+1; one->first-roll1; one->second-roll2; } 11 12 13 14 15 16 17 void roll (Dice *arr, int* n) { roll(arr); n++; } 18 19 20 21 22 23 24 25 26 27 28 29 void display (Dice* arr, int n) { unsigned score=0; for (int i=0;ifirst+(arr+i) ->second; if (score==7) { score=; } cout #include 3 4 5 clang++-7 -pthread -std=c++17 -o main library.cpp main..Q X 2./main Welcome to the knock-out game. How many rounds of rolling would you like to have? 2 Round 1 Rolls: Oxbf4690 Round 2 Rolls: Oxbf4698 6 using namespace std; 7 8 9 10 void roll (Dice* one) { unsigned roll1=rand(%6+1; unsigned roll2=rand (%6+1; one->first-roll1; one->second-roll2; } 11 12 13 14 15 16 17 void roll (Dice *arr, int* n) { roll(arr); n++; } 18 19 20 21 22 23 24 25 26 27 28 29 void display (Dice* arr, int n) { unsigned score=0; for (int i=0;ifirst+(arr+i) ->second; if (score==7) { score=; } cout<><>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago