Re: TreeView Control question



Thanks, Martin, and I had better study c from the beginning again :)

> The problem ist you have a temporal string, that gets destroyed driectly
> after this statement. The description says to c_str "The return value
> is valid only as long as the string exists" and "The return value is
> owned by the string".
>
> So rewrite the code in this way:
>
> string myStr = mame();
> insertData.item.pszText = const_cast<char*>(myStr.c_str());
>
> HTH
>
> --
> Martin Richter [MVP] WWJD
> "In C we had to code our own bugs. In C++ we can inherit them."
> FAQ : http://www.mpdvc.de
> Samples: http://www.codeguru.com http://www.codeproject.com


.



Relevant Pages

  • Re: Predicting the Future and Kolmogorov Complexity
    ... I haven't pulled Martin Löf's 1966 article yet, but none of the articles I ... the string. ... then there seems to be a relationship here to predictability. ... The algorithm used to compute pi doesn't ...
    (talk.origins)
  • Re: Strings!!
    ... I thought I'd try a change from my usual Martin 80:20 bronze (extra-light 10 ... The guitar shop had some Guvnor phosphor bronze similar gauge at ... string buzzed horribly when fretted! ...
    (uk.music.guitar)
  • Re: Insert Into - Invalid Operation
    ... "Martin" wrote: ... > and I executed in the query windows and it worked) but I still have the error. ... > As the string is right, do you think that I have some mistake here? ... >> I ran the sub (I manually changed the control names to variable name ...
    (microsoft.public.access.queries)
  • RE: secure unpickle?
    ... [John J. Lee, on Gandalf's saferestricted unpickling code, ... > problems, at least by Martin v. Loewis, but ... pickle that unpickled to a multi-gigabyte string ...
    (comp.lang.python)
  • Why the Tizzy top E?
    ... our guitars, two Martin OM's and two Santa Cruz' all ... I then called another couple of mates, one with a Martin M36 and the ... as soon as the string is fretted in any position. ... also cleans up if the string is loosened and moved on the saddle a fraction ...
    (rec.music.makers.guitar.acoustic)