I am new to C++, but I do pretty well at C# and Java. I am trying to do some basic exercise here:
// HelloWorld.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
bool isSame(int[] pFirst, int[] pSecond, int pLength) {
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
That is my entire file, but VC++ (I am using VS 2013) keeps complaining:
1 IntelliSense: expected a ')'
at the isSame
declaration line.
What do I do wrong? I am writing a function to compare if two arrays are containing the same values, and here is the solution:
bool ArrayEq( int A1[], int A2[], int size ) {
for (int k=0; k<size; k++) {
if (A1[k] != A2[k]) return false;
}
return true;
}