Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CString Class

Status
Not open for further replies.

MinnisotaFreezing

Programmer
Jun 21, 2001
120
KR
I have heard the CString class mentiond quite often in these forums, though I have never used them, I do string manipulation with the C functions found in string.h. If CString is easier, I would like to learn to use it, but I am worried about performance hits and compatibility, especially the size of the exe. Anyone have any thoughts on this, am I being over cautious?

Anyone have strong feelings either way?

CJB
 
:)I The CString class does not have an apreciable overhead, and can be more efficient than using the C string handling functions, as it incorporates reference counting, etc (2 identical strings share the same storage). Also the class incorporates many useful functions for string manipulation.

As for .EXE size, if you are using MFC, much of the MFC code uses CStrings internally, so your .EXE probably already includes the CString class code.

Go ahead, try it!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top