Weird outcome
Jun 2, 2010 at 7:31pm
So I wondered if you could do
cin>> var1, var2;
and I made this little program. the only flaw is, it always says FALSE =S
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#include <iostream>
using namespace std;
double var1, var2;
bool x;
int main ()
{
cout<< boolalpha;
cout<<"give first number";
cin>> var1, var2;
x = var1==var2;
cout<< x ;
return 0;
}
|
Is it actually even possible to
cin>> var1, var2;
Thanks in advance,
Xander
Jun 2, 2010 at 7:34pm
Last edited on Jun 2, 2010 at 7:37pm
Jun 2, 2010 at 8:11pm
Thanks (again) Albatross!
Topic archived. No new replies allowed.