CP> Behold, a function which returns a pointer:
Your sentence should have had the following words at the end (after
the word "pointer"): " to an automatic variable which was declared in
the function". This is an offense punishable by death if your user has
a bad temper. IOW, don't ever do this. Not even if it works once or
twice. What the compiler was trying to tell you was that it was trying
to convert that pointer to something that would be guaranteed to exist
after your program exited the function. The compiler couldn't do this
and issued "general" pointer-related error message rather than tell you
to go soak your head.
* KWQ/2 1.2i *
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)
|