On Mon, 2005-06-06 at 12:07, Alaios wrote:
> Hi .. .i am trying to pass oid as a parameter to a
> function..
> myfunction(oid *myoid){
> size_t length_myoid= sizeof(myoid)/sizeof(oid)
Nope.
That will take the size of the OID *pointer*,
not the full array. You need to pass the length of
the arr
Hi .. .i am trying to pass oid as a parameter to a
function..
int main(int argc,char **argv){
oid myoid[]={1.3.6.8.9};
myfunction(myoid);
}
myfunction(oid *myoid){
size_t length_myoid= sizeof(myoid)/sizeof(oid)
//seems to work//
printf("%d" \n",myoid[1]); //prints correctly the
second val