If statement not working!
Can someone help me with this please? I was programming some crap today and it just wasnt working.
Code:
<stdlib.h>
<iostream.h>
char Countrys[10];
char Country1[10] = "Aus";
char Dogs[10];
char Dog1[10] = "Labrodoar";
int Cost;
int People = 12;
void main(void)
{
Countrys = Country1;
Dogs = Dog1;
if (Countrys == Country1 && Dogs == Dogs1) // Both of which do!
{
Cost = People;
}
cout << Cost;
}
Now this should work and there are no errors in it but when the screen shows the "Cost" it is still at 0.
Any thoughts?
Paul