Arrays 表达式必须具有指向数组中对象类型错误的指针 #包括 #定义尺寸10 类型定义结构{ int nelem;//数组中的数字量 整数向量[DIM]; }t_向量_int; int main(){ t_vector_int vect={5,{3,23,56,109,238}; int n,i=0; printf(“病媒生物学:3,23,56,109,238\n\n肠道疾病研究所:”); scanf(“%d”和“&n”); while(vect[i]
您需要使用成员Arrays 表达式必须具有指向数组中对象类型错误的指针 #包括 #定义尺寸10 类型定义结构{ int nelem;//数组中的数字量 整数向量[DIM]; }t_向量_int; int main(){ t_vector_int vect={5,{3,23,56,109,238}; int n,i=0; printf(“病媒生物学:3,23,56,109,238\n\n肠道疾病研究所:”); scanf(“%d”和“&n”); while(vect[i],arrays,c,structure,Arrays,C,Structure,您需要使用成员vector,而不是结构变量本身 改变 #include <stdio.h> #define DIM 10 typedef struct{ int nelem; //amount of numbers in the array int vector[DIM]; }t_vector_int; int main(){ t_vector_int vect={5,{3, 23, 56, 109, 238}}; int n, i=0;
vector
,而不是结构变量本身
改变
#include <stdio.h>
#define DIM 10
typedef struct{
int nelem; //amount of numbers in the array
int vector[DIM];
}t_vector_int;
int main(){
t_vector_int vect={5,{3, 23, 56, 109, 238}};
int n, i=0;
printf(" Vector inicial: 3, 23, 56, 109, 238\n\nIntroduzca un valor entero: ");
scanf("%d", &n);
while(vect[i] <= n){
}
return 0;
}
while(向量[i]
while(vect[i] <= n)
while(vect.vector[i] <= n)