#include
using namespace std;
int main()
{
bool val1;
string val2;
cin>>val1;
cin.get();
getline(cin,val2);
}
Hey, in this question if i input(true) in val1, then program is terminating without inputting val2…
So, what is the reason?
#include
using namespace std;
int main()
{
bool val1;
string val2;
cin>>val1;
cin.get();
getline(cin,val2);
}
Hey, in this question if i input(true) in val1, then program is terminating without inputting val2…
So, what is the reason?
hello @CODER_JATIN
u cannot give true string to a boolean variable.
give input 1 (for true) and 0 (for false)
ok ji, thanks. . . . .