Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

Kindly help me fix my display method in this C++ program: http://txt.do/d32k OR http://textuploader.com/d32k Thank you!

OpenStudy (e.mccormick):

void display(queuetype &queue); \(\leftarrow\) Declaration void display(queuetype &queue, string newElement) \(\leftarrow\) Function There is an argument mismatch to start.

OpenStudy (e.mccormick):

And read this: http://www.tutorialspoint.com/cplusplus/cpp_member_operators.htm

OpenStudy (anonymous):

I removed "string newElement" from the display function, which gives a declaration error for "newElement." Among other errors. Could you kindly be more specific? Thank you.

OpenStudy (e.mccormick):

Where you used it in the code: ``` while (!emptyqueue(elements)) { // this while loop runs whenever returned false dequeue(elements, elementOut); cout << elementOut << endl; display(queue, newElement); } ``` That means you did not need to delete it in the function implementation, but rather add it to the function declaration. My second note is a reference to the use of a struct in general. ``` struct queuetype { string elementsOfArray[MAX]; int front; int back; }; ``` Means that to directly access elementsOfArray, front, or back you need to use the dot or arrow operator.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
23 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!