Answered step by step
Verified Expert Solution
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.
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: elseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started