Thanks for your answers but i think it is my fault not being more precisly!!!!
this is my problem
I generate a two dimension array static and then create ramdonly number but when i try to do the same thing using a dinamic array i got problems.. this is what i got
printf("Please enter the number of nodes, dimension and maximum distance. ");
scanf("%d %d %d",&Number_nodes, &dimension, &max_distance);
nodes= (int *)malloc(sizeof(int)*Number_nodes);