Salt_Peter
11/17/2008 9:52:00 AM
On Nov 16, 10:14 pm, Carl Forsman <fatwallet...@yahoo.com> wrote:
> how to compare a CString?
>
> the following does not seem to work.
>
> CString id = PictureEntries[i].attribute("id").value();
>
> if (id.Compare("2222") == 1){
> cout << id << endl;
> }
Whats a CString?
As a hint: what is the difference between a null terminated sequence
of characters and one that isn't null terminated? The point here is
that if you don't know or aren't sure, use a little brain power:
CString id("abcdef")
if( id.Compare( CString("abcdef") )
{
// do stuff
}