I'm not totally sure what your asking.
The string class contains other fields that are part of that class that will 
add to the size.
If you want a more robust and compact string you'll have to write a class 
yourself or use char*.

  ----- Original Message ----- 
  From: anju chandran 
  To: [email protected] 
  Sent: Wednesday, February 04, 2009 8:42 AM
  Subject: [c-prog] memory utilisation by string variables



  hi all,

  it has been noticed that string variable is taking more memory than character 
array in a particular C++ program ,is there any way to use string variable 
itself without using character array,consuming less memory ,tried with string 
functions like resize and reserve,but no use,please help

  in anticipation 


  [Non-text portions of this message have been removed]



   

[Non-text portions of this message have been removed]

Reply via email to