Re: push_back problem.
From: Bo Persson (bop_at_gmb.dk)
Date: 01/09/05
- Next message: Justin Marshall: "RE: push_back problem."
- Previous message: Justin Marshall: "RE: push_back problem."
- In reply to: Justin Marshall: "Re: push_back problem."
- Next in thread: Justin Marshall: "RE: push_back problem."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 9 Jan 2005 17:41:44 +0100
"Justin Marshall" <JustinMarshall@discussions.microsoft.com> skrev i
meddelandet news:9B6F6552-981A-4773-AD7A-60C0136AC9AA@microsoft.com...
> Ive debugged it, and it doesn't become NULLS(thats how it appears in
> debug
> anyway), untill it reaches the push_back function.
>
> Aside from this being a really horrific function, it works in the main
> half
> of my program. ReadToken takes a extra parmetor which gets compared
> against
> the next token. The actuall function that reads it is ReadWord which
> is
> listed below.
>
> char *jmParser::ReadWord(void)
> {
> char token[60];
> char *c = new char[60];
> int i = 0;
>
snip
>
> return token;
> }
And right here you return a pointer to the local token buffer. It
disappears as soon as the function ends!
Bo Persson
- Next message: Justin Marshall: "RE: push_back problem."
- Previous message: Justin Marshall: "RE: push_back problem."
- In reply to: Justin Marshall: "Re: push_back problem."
- Next in thread: Justin Marshall: "RE: push_back problem."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|