I already know how to program. I go passed a programming class already. I had to take another one and I can't figure out this error. The last one was boolean. it needed to be == instead of =....


I already know how to program. I go passed a programming class already. I had to take another one and I can't figure out this error. The last one was boolean. it needed to be == instead of =.


exchangeCards == "Y".



#include
#include
#include
#include
#include


#include "card.h"
#include "deck.h"
#include "hand.h"


using namespace std;


/************************************************************
* FunctionName *
* Function description *
* *
* *
************************************************************/
int main()
{
string repeat = "Y";
Deck myDeck;
Hand myHand;
string exchangeCards;


while (repeat == "Y" || repeat == "y")
{
cout <>


myHand.newHand(myDeck);
myHand.print();
cout <>


cout < "would="" you="" like="" to="" exchange="" any="" cards?="" [y="" n]:="">
getline(cin, exchangeCards);


while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" && exchangeCards != "n")
{
cout < "please="" enter="" y="" or="" n="" only:="">
getline(cin, exchangeCards);


}


if (exchangeCards == "Y" || exchangeCards == "y")
{
myHand.exchangeCards(myDeck);
}
cout <>


myHand.print();


cout <>


myDeck.reset(); // Resets the deck for a new game


cout < "play="" again?="" [y="" n]:="">
getline(cin, repeat);
while (repeat != "Y" && repeat != "y" && repeat != "N" && repeat != "n")
{
cout < "please="" enter="" y="" or="" n="" only:="">
getline(cin, repeat);


}


}


return 0;
}



myDeck.reset is where it won't compile. You answered my question right before, I apollogize but I thought you needed code that you didn't need. Now I can provide you with the additional code if you reject the question but in order for me to understand this next step, I need to see it. I can only understand c++ when working with others on it at the same time.


A main.cpp - Code:Blocks 20.03<br>X<br>File Edit View Search Project Build Debug Fortran wxSmith<br>Tools Tools+ Plugins DoxyBlocks Settings Help<br>/** *<<br>S C<br>| <global><br>vmain) : int<br>Management<br>Start here X main.cpp x deck.cpp X<br>Projects<br>FSymbols<br>Files<br>string repeat =

Extracted text: A main.cpp - Code:Blocks 20.03 X File Edit View Search Project Build Debug Fortran wxSmith Tools Tools+ Plugins DoxyBlocks Settings Help /** *< s="" c="" |=""> vmain) : int Management Start here X main.cpp x deck.cpp X Projects FSymbols Files string repeat = "Y"; Deck myDeck; 29 Workspace 30 31 Hand myHand; 32 string exchangeCards; 33 34 while (repeat == "Y" || repeat == "y") 35 36 cout < endl;="" 37="" 38="" myhand.newhand="" (mydeck)="" ;="" myhand.print="" ();="" cout="">< endl;="" 39="" 40="" 41="" 42="" cout="">< "would="" you="" like="" to="" exchange="" any="" cards?="" [y="" n]:="" ";="" 43="" getline="" (cin,="" exchangecards);="" 44="" 45="" while="" (exchangecards="" !="y" &&="" exchangecards="" !="y" &&="" exchangecards="" !="X" &&="" exchangecards="" !="n" )="" 46="" {="" 47="" cout="">< "please="" enter="" y="" or="" n="" only:="" ";="" 48="" getline="" (cin,="" exchangecards);="" 49="" 50="" 51="" 52="" if="" (exchangecards="=" "y"="" ||="" exchangecards="=" "y")="" 53="" {="" 54="" myhand.exchangecards="" (mydeck)="" ;="" 55="" 56="" cout="">< endl;="" 57="" 58="" myhand.print="" ();="" cout="">< endl;="" 61="" 62="" o="" mydeck.reset="" ()="" ;="" resets="" the="" deck="" for="" a="" new="" game="" 63="" cout="">< "play again? [y / n]: "; getline (cin, repeat); 64 65 logs & others 2 code:blocks x q search results x a cccc x ở build log x p build messages x cppcheck/vera++ x 2 cppcheck/vera++ messages x cscope x z doxyblocks x f fortran info x closed files list x q thread search x file line message === build file: "no target" in "no project" (compiler: unknown) === c:\users\cccc... in function 'int main ()': c:\users\ccee... 62 error: 'class deck' has no member named 'reset'; did you mean 'resetdeck'? === build failed: 1 error (s), 0 warning (s) (0 minute (s), 0 second (s)) === c:\users\cccccc\documents\assignment 2\main.cpp c/c++ windows (cr+lf) windows-1252 line 59, col 1, pos 1497 insert read/write default "play="" again?="" [y="" n]:="" ";="" getline="" (cin,="" repeat);="" 64="" 65="" logs="" &="" others="" 2="" code:blocks="" x="" q="" search="" results="" x="" a="" cccc="" x="" ở="" build="" log="" x="" p="" build="" messages="" x="" cppcheck/vera++="" x="" 2="" cppcheck/vera++="" messages="" x="" cscope="" x="" z="" doxyblocks="" x="" f="" fortran="" info="" x="" closed="" files="" list="" x="" q="" thread="" search="" x="" file="" line="" message="==" build="" file:="" "no="" target"="" in="" "no="" project"="" (compiler:="" unknown)="==" c:\users\cccc...="" in="" function="" 'int="" main="" ()':="" c:\users\ccee...="" 62="" error:="" 'class="" deck'="" has="" no="" member="" named="" 'reset';="" did="" you="" mean="" 'resetdeck'?="==" build="" failed:="" 1="" error="" (s),="" 0="" warning="" (s)="" (0="" minute="" (s),="" 0="" second="" (s))="==" c:\users\cccccc\documents\assignment="" 2\main.cpp="" c/c++="" windows="" (cr+lf)="" windows-1252="" line="" 59,="" col="" 1,="" pos="" 1497="" insert="" read/write="">
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here