Re: CString Array to LPCTSTR *

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Vipin" <Vipin@xxxxxxxxxx> wrote:
What you have done below is highly error prone. As the CString objects go
out of scope the list will have dangling pointers.

The OP stated that he wished to pass it to a function. Provided the call was
contained inside the function, and CStrings were not modified the vector
array would go out of scope at the same time as the CString array

--
- Mark Randall
http://www.temporal-solutions.co.uk
http://www.awportals.com


.



Relevant Pages

  • Re: SetFont does not set font
    ... Mark Randall wrote: ... > scope at the top of my dialog. ... Are you 100% sure that the font still exists when the objects are drawn? ...
    (microsoft.public.vc.mfc)
  • Re: CString Array to LPCTSTR *
    ... As the CString objects go ... out of scope the list will have dangling pointers. ... Vipin Aravind ...
    (microsoft.public.vc.mfc)