That's pretty clever, actually...any idea if C++ allows a method to be used on a constant in that fashion? i.e. "foo".equals(someString)?
No, it doesn't support it; when you use a language intended for developers who still exhibit prokaryotic traits you pass up most of the niceties of modern programming.
You can hack around it by doing things that are in fact harder to read than the standard ways of doing a comparison. They're also less efficient than a standard comparison--the reason it's not a perf hit in C# or Java is because string literals in either language are interned objects that don't have to be created at invocation. C++, being a stupid language (in the literal sense), has no such concept. (EDIT: SolarShado's use of 'new' above is not a good idea--it leads to memory leaks. It should be stack allocated instead.)
The obvious and correct answer is to not use stone knives (C++ or, if you're especially masochistic, C) when you have a Sawzall (tools developed in the last twenty years--pick one).
I think most C/C++ compilers convert string literals to char[]s (or char*'s, same thing really), making it not an object.
A string literal in C++ is of type const char[], IIRC (or, in other words, const char* and the literal includes a \0 on the end).