I have the following code:
Function1()
{
PUINT16 a;
a = (PUINT16)info->b;
Function1(a);
}
Fuction2(PUINT16 p)
{
INT c = p[0] & 0xFF;
....
}
Whats does p[0] refer to?
I have the following code:
Function1()
{
PUINT16 a;
a = (PUINT16)info->b;
Function1(a);
}
Fuction2(PUINT16 p)
{
INT c = p[0] & 0xFF;
....
}
Whats does p[0] refer to?
Hope this is right.....
The first member of the array p?
Visit entropysink.com - It's what your PC is made for!
>Hope this is right.....
It is
-Prelude
My best code is written with the delete key.
HEY!!!! I'm getting the hang of this!
Visit entropysink.com - It's what your PC is made for!
This code doesn't look right:
First off, the function calls itself recursively passing a parameter but it doesn't look like the function accepts a parameter as you have it defined.Code:Function1() { PUINT16 a; a = (PUINT16)info->b; Function1(a); }
Secondly, there is no condition that will cause this function to halt the recursion. It will keep calling itself until it runs out of stack space, crashing the program.
Is this just supposed to be a sample of code to illustrate the problem you are having? If not then it needs fixing.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens