Home > Back-end > Value of type int * can not be assigned to the entity of type int
Value of type int * can not be assigned to the entity of type int
Time:12-12
Defines a structure body
Typedef struct binElement { Float weight; Int voxelIndex; } binElement;
To define a structure, in which the element contains the first structure element
Typedef struct LORData { PElement binElement *; Int LORIndex; Int voxelNum; } LORData;
In the main () function in the
LORData * List; Int a, b, c1, c2,... , d1, d2,... ;//this a few assumptions have assignment; for(int i=0; i{ The List - & gt; LORIndex=a; The List - & gt; VoxelNum=b; for(int j=0; j{ The List - & gt; PElement [j]. Weight=c1;//here, according to the error will not float * type distribution of the value of the collocation of float type of entity The List - & gt; PElement [j] voxelIndex=d1;//an error here, according to a value of type int * can not be assigned with the int type of entity } }
CodePudding user response:
What you posted there is no problem, in addition to int voxelNum behind the semicolon is Chinese semicolons,