Assignment with classes

Can you please find errors my program for minesweaper in which I needed to use classes.Here it is:
#include<ctime>
#include<iostream>
#include<cstdlib>
using namespace std;
class mines{
public:
void grid(int table[8][8]);
void selectCoords(int& x,int& y);
void check(int& x,int& y,int& n,int table[8][8],int& p);
}prob;
void mines::grid(int table[8][8])
{
for(int f=0;f<=7;f++)
for(int g=0;g<=7;g++)
table[f][g]=(rand()%2);

}
void mines::selectCoords(int& x,int& y)
{
cout<<"enter first coordinate:";
cin>>x;
cout<<"enter second coordinate:";
cin>>y;
}
void mines::check(int& x,int& y,int& n,int table[8][8],int& p)
{

if(table[x][y]==1)
{
n++;
cout<<"You lost one life!"<<3-n<<endl;



}
else if(table[x][y]==0)
p++;
cout<<"number of points:"<<p<<endl;
if (x,y<=8)
{
cout<<endl;
}
else
cout<<"invalid number"<<endl;
}
int main()
{
int n=0;
int p=0;
int x,y;
int table[8][8];
mines prob;
prob.grid(int table[8][8]);
prob.selectCoords(int& x,int& y);
prob.check(int& x,int& y,int& n,int table[8][8],int& p);


do{
selectCoords(x,y);
check(x,y,n,table,p);

}
while(n<3);
cout<<"game over"<<endl;
cout<<"number of points:"<<p<<endl;
system("PAUSE");
return 0;
}
Please use [code][/code] tags and say what's wrong with that
Surely there are at least three compile errors in main() itself.
But where is main!!!??
Didn't the compiler point out the syntax errors?

Have you thought about what while(n<3); does?
This is a problem too:

 
if (x,y<=8)

Topic archived. No new replies allowed.