Hi , how would i use char with bool here is the code :
Code:bool buy = true; bool dbuy = false; cout <<"Do you want to buy a can of coke? : " << endl; cin >> buy; if (buy = 'yes') { cout <<"Bought!" << endl; } if (dbuy = 'no') { cout <<"No sale!" << endl; }