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?

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.