Thread: help!
View Single Post
  #3 (permalink)  
Old August 11th, 2004, 01:46 AM
Ankur_Verma Ankur_Verma is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

I'm not sure, but it seems to be a problem with string class and how it manages memory. str retains the value and its memory address until just before the main starts excecuting and loose them as soon as excecution enters main.

Try the same program with char* and you would see no such problem.

Ankur
Reply With Quote