0

i write a program that goes as follows
a part of it is:

#include <iostream>
using namespace std;

const int size=8;
const int plus[]={1,2,3,4,5,6,7};
const int minus[]={-1,-2,-3,-4,-5,-6,-7};

int vertical(int[][size],int&,int&);
int horizontal(int[][size],int&,int&);
int diagonal();

int main()
{
	int board[size][size]={};
	int accesibilityboard[size][size]={};
	int currentrow=3;
	int currentcolumn=4;
	int counter=0;

}

int diagonal()
{
int temp;
temp=plus[1]; //in this line i get the error that i havent declared the array,but its there declared global in line 5!!!whats the problem?

}

the global scope isnt working as with the variables?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by ntrncx
0

The problem is that there's a template in the standard library named plus, so your program is conflicting with that definition. Change the name to something else.

0

thanks problem solved!!!netbeans wasn't saying anything about template anyway thankssssssssssss

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.