Fejl i kode if statement
#include <iostream>#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
int a,b;
char wot;
int result;
cout <<"Write a number" << endl;
cin >>a;
cout <<"What do you want to do?" << endl;
cin >>wot;
cout <<"Write number two now" << endl;
cin >> b;
if(wot=="+")
{
cout <<"hey"<<endl;
}
system("pause");
return 0;
}
Hvorfor virker det ikke? :S