Yeah - it really looks like you are lost.
Rethin your code with the pointers:
int n,m;
int * Vcolor;
int **w;
public:
graphcoloring (int N)
{
n=N;
m=N;
w=new int*[n];
for(int i=0; i<=n; ++i)
{
w[i]=new int[n];
}
Vcolor=new int[m];
}
My tip: first improve your code quality
1. rename all variables and funcitond to "speaking names"
2. use some simple class for the int* stuff
3. insert some debug output (if it works it can get removed)
good luck ;-)