你没有多少PROGRAMMING的经验吧?

来源: 2005-09-08 21:08:30 [旧帖] [给我悄悄话] 本文已被阅读:

2000 char * getbuf()
2001 {
2002 char buff[8];
2003-2050 /* unspecified, buff defined here *./
2051 return (char *) buff;

Abusing Local Addresses

Don't return a pointer or reference to a local variable.

This function has the annoying property of working on occasion.

http://www.informit.com/articles/article.asp?p=30642&seqNum=7&rl=1

.....