错误信息 "subscripted value is neither array nor pointer nor vector" 表明你尝试对一个非数组、非指针、也非向量的值使用了下标操作符(如 [])。在C、C++等语言中,下标操作符通常用于访问数组、指针指向的内存位置,或在某些情况下(如使用标准模板库中的std::vector)用于访问容器中的元素。 2. 分析可能导致该...
distance=sqrt[pow(x1-x2,2.0)+pow(y1-y2,2.0)];这一句用错括号了,函数应该是用( ),[ ]是数组用的 正确的格式是 distance=sqrt(pow(x1-x2,2.0)+pow(y1-y2,2.0));
C语言程序报错:subscripted value is neither array nor pointer nor vector(下标值既不是数组也不是指针也不是向量) 原因: int a; int a[10];(对一个变量不可以使用下标) 解决方法:重命名a或者a[10]。
C - Error: subscripted value is not an array, pointer, or, int **number; would work as an array of pointers, but he'd have to allocate an array of r pointers and then allocate r arrays of c ints assigned to … Tags: subscripted value is neither array nor pointer nor vectorerror...