Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

guys here is a c++ question. I want to design a little game similar to go fish. Yet i always encounter the error showing above.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

guys here is a c++ question.

I want to design a little game similar to go fish. Yet i always encounter the error showing above. I have narrowed down the question to be in my play function. When I solely use deletecard() or c.deletecard() in function play, it gives me no error and give me a wrong output. When I use both of them, it then gives me the error above. Can someone take a look at it? It is really werid.

void hand: :deletecard (string d line) t Card next; Card* p head; Card* prev =NULL; while (head->shape_value d line) p head->next ; delete head head p: return: while (p !=NULL) { d line) if (p->shape_value next = p->next ; delete p: if (prev !=NULL) prev->next = next ; p = next; if (p NULL) tail = prev; return: else void hand: :deletecard (string d line) t Card next; Card* p head; Card* prev =NULL; while (head->shape_value d line) p head->next ; delete head head p: return: while (p !=NULL) { d line) if (p->shape_value next = p->next ; delete p: if (prev !=NULL) prev->next = next ; p = next; if (p NULL) tail = prev; return: else

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions