Page 1 of 1

CString : I'm ashamed

PostPosted: Mar 16, 2003 @ 3:54pm
by Alfredo

PostPosted: Mar 16, 2003 @ 3:56pm
by Alfredo

PostPosted: Mar 16, 2003 @ 10:05pm
by Dan East
CString is part of MFC. You have to create an MFC app to use it.

Dan East

PostPosted: Mar 16, 2003 @ 11:54pm
by pacomac

PostPosted: Mar 17, 2003 @ 3:06am
by Dan East

PostPosted: Mar 17, 2003 @ 3:35am
by damian

PostPosted: Mar 17, 2003 @ 7:54pm
by superman2

PostPosted: Mar 18, 2003 @ 1:39pm
by Dave H

PostPosted: Mar 18, 2003 @ 4:33pm
by Dan East
Um, I was showing the ease in which string copies, concatenations and UNICODE conversions can be done with CString. If your purpose is to optimize a contrived example then the correct response is:

AfxMessageBox(_T("This is a test"));

CString::Format performs the same functionality of sprintf, again with automatic UNICODE conversion.

Dan East

PostPosted: Mar 18, 2003 @ 4:55pm
by Dave H

PostPosted: Mar 18, 2003 @ 6:11pm
by Dan East

PostPosted: Mar 18, 2003 @ 7:02pm
by Dave H

PostPosted: Mar 20, 2003 @ 2:53am
by superman

PostPosted: Mar 26, 2003 @ 6:00pm
by adde
If you want a string class that is thourougly tested, optimized and works pretty much like Javas String (or CString although I have never used MFC because I think it really sucks), then the STL string container is the answer.

STLport (www.stlport.org) is a free available STL source library that works on practically any platform. Just make shure you disable the iostream support first. Info on how to do this can be found on www.pocketfrog.com and on the PocketFrog forum here on PocketMatrix.