Hi, its been a long time since I've done any C, and I've forgotten how to use a pointer in a function declaration. For example I want to declare a function with two arguments, an integer, and a pointer to an integer. The pointer will be the address of the first element of an integer array, and within the function I want to parse through the array using pointer arithmetic, but I can't remember the syntax, and everything I try won't compile.
an example of the kinda thing I want to do:
Code:void function(int *array_ptr, int x){ for(i=0;i<x;i++){ ans = (array_ptr+i) * 3.14; //none of these compile ans = *(array_ptr+i) * 3.14; ans = &(array_ptr+i) * 3.14; } }