lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wednesday 02 February 2005 03:10 pm, Michael Newberry wrote:
> I think I just recognized my own problem  (cause by the other problem:
> "coding + coffee + sleep = constant"). I violated a rule I preach all the
> time, about not pushing volatile things on the stack!!! That CString s is
> not persistent. Ugh! Sorry to waste people's time!

Don't be too hard on yourself ... I think this example rather demonstrates the 
dangers of a class design that does unsafe implicit type conversions. Is 
CString a class with an implicit conversion to char *?  If yes, that is where 
the real problem lies.

(I assume that char * is what LPCTSTR is supposed to be? - I am no longer up 
to speed with respect to Microsoft's weird naming convention)

Regards
- Christian