pointer use as array
2012-05-11 17:47
337 查看
int* A = (int*)malloc(sizeof(int)*s);
A[0]=11; A[1]=22;
printf("A = %d %d\n", A[0], A[1]);
// the same reason:
s_fm_solution_t** fm_sol;
fm_sol[index] = camus_fm_solver(self, pmatrix); // because camus_fm_solver get the (s_fm_solution_t*) type;
// pointer, when just use(not alloc), dont need &, but pointer** is another thing
A[0]=11; A[1]=22;
printf("A = %d %d\n", A[0], A[1]);
// the same reason:
s_fm_solution_t** fm_sol;
fm_sol[index] = camus_fm_solver(self, pmatrix); // because camus_fm_solver get the (s_fm_solution_t*) type;
// pointer, when just use(not alloc), dont need &, but pointer** is another thing
相关文章推荐
- C++ AMP: uses tile_static(lds) as function param: 2 methods ( array or Pointer)
- PHP“Cannot use object of type stdClass as array”
- queue ----also use array[] and link pointer
- PHP“Cannot use object of type stdClass as array”
- PHP警告Cannot use a scalar value as an array的解决方法
- PHP错误Cannot use object of type stdClass as array in错误的解决办法
- 关于Cannot use a scalar value as an array的解决办法
- PHP“Cannot use object of type stdClass as array”
- PHP“Cannot use object of type stdClass as array”
- PHP警告Cannot use a scalar value as an array
- Cannot use object of type stdClass as array
- Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning
- php “Cannot use object of type stdClass as array” 的解决方法
- PHP警告Cannot use a scalar value as an array的解决方法
- php下关于Cannot use a scalar value as an array的解决办法
- 使用json_decode()转换返回数组或对象时出现:Cannot use object of type stdClass as array
- PHP“Cannot use object of type stdClass as array” (php在调用json_decode从字符串对象生成json对象时的报错)
- Cannot use object of type PHPExcel_RichText as array
- php下关于Cannot use a scalar value as an array的解决办法
- Cannot use object of type yii\db\Connection as array