Python, ADO, VC++ 6
Alex Martelli
aleaxit at yahoo.com
Tue Jan 9 07:49:56 EST 2001
"Keith Farmer" <farmerk at pacbell.net> wrote in message
news:Y1w66.177$w7.162743 at news.pacbell.net...
[snip]
> ... I can't seem to access the (traditional) string class, even when
> importing <string.h>, which does exist and which VC++ can locate. I don't
<string.h> lets you access traditional C string functions (strcpy, &c).
For the std::string class, you need to #include <string> (that's what
the C++ standard specifies, and what VC++ implements).
> know why this is. In any case, this code now works and I should be able
to
> use the _bstr_t objects just fine for what I need them to do.
You're probably better off with bstr_t (in terms of convenience) thanks
to its transparent Unicode<->SBC conversions. A performance hit, but
then, if you need to avoid that, you must use Unicode exclusively if
Windows/NT and/or any COM/Automation is involved.
Anyway, this has a bit less than 0 to do with Python, so I think that
if the conversation is to continue we should move it somewhere else.
Alex
More information about the Python-list
mailing list