it's been a long time, i have a problem, i need to generate random values, but these values need to be coordinates (x,y) i would like to hear ideas about how to do it?
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
int Number_nodes;
int dimension;
int max_distance;
int* nodes;
int i,j;
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);
for(j=0;j<Number_nodes;j++){
nodes[j]=(int *)malloc(sizeof(int)*Number_nodes);
}