As you may know, a pointer has many uses to it, one of which allows you to pass the pointer to a function and store and maintain the any new value the function may provide for that pointer. Now a static variable allows a variable to maintain it's value that may be computed within its local function, no matter how many times that function is called externally. So, a static pointer is basically a pointer that my retain its value within the function where it is defined. As the answer above me mentioned, a static pointer therefore wouldn't make much sense as you'd be somewhat contradicting the uses for a pointer and a static variable.
What is a static pointer in C?
go to
www.cprogramming.com
it has all your coding and turorial needs for C and C++
Reply:A static pointer is a pointer that points to a static memory location. I don't think that static pointers are used very much because that pretty much goes against the purpose of pointers; to be able to point to different objects.
balsam
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment