我有一个问题,如何制作一个vertextDegree [nbColours]
包含 nbColours
元素的数组,但是“nbColours”未知,我必须从文件中获取它。看看代码,我能做些什么来解决这个问题?
int nbEdges,nbVetices, nbColours ;
typedef struct st_graphVertex
{
int index;
int colour;
int val ;
int vertexDegree[nbColours]; // it won't work because nbColours unknown
// here and I want get it from file in the main
struct st_graphVertex *next;
t_edgeList *out;
}t_grapheVertex;