[Bug libstdc++/57937] fgets and cout tricky bug
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 19 21:18:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57937
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You are returning a pointer to a local variable.
If i change:
char hwa[100];
To:
static char hwa[100];
Then it works correctly.
More information about the Gcc-bugs
mailing list