Below is the code I have come up with but no matter what I put into the strings it comes out saying not equal. Please help! I'd greatly appreciate it.
Code:
#include <iostream>
#include <iomanip>
#include <string>
//#include <iostream.h>
using namespace std;
bool is_equal(int A[], int B[], int size);
int main( )
{
int A[] = {1,2,3,4,5,6,7,8,9};
int B[] = {1,2,3,4,5,6,7,8,9};
if(is_equal (A,B,9))
cout << "They are equal " << endl;
else
cout << "They are not equal " << endl;
system("pause");
}
bool is_equal (int A[], int B[], int size)
{
for (int i =0; 1 < size; i++)
{
if (A[i] != B[i])
return false;
}
return true;
}
Please help I am stuck