Re: Problem with using char* to return string by reference
On Jun 13, 5:35 pm, Hendrik Schober <Spamt...@gmx.de> wrote:
Giovanni Dicanio schrieb:
"Hendrik Schober" <Spamt...@gmx.de> ha scritto nel messaggio
news:%232rgTrTzIHA.3884@TK2MSFTNGP05.phx.gbl...
(I've never used them.)
Well, in these modern days I think that it makes sense to just use Unico=
de,
and forget about ANSI.
(Considering that new Windows Vista APIs are Unicode-only, too...)
So, if one likes STL strings, I think that directly using std::wstring,
wchar_t*, etc. (and not TCHAR stuff) in code is just fine.
I've created a similar setup (typedef'd char type, and based
on that 'std::basic_string<>' instances) a couple of years
age, that's been used in many projects. But since these are
ported across many platforms, Windows API stuff wasn't used.
Giovanni
Schobi
Is std::string usable in non-MFC apps?
Is std::string able to handle UNICODE strings?
Is my program safer from buffer-overrun problems if I pass
'std::string's object as reference in functions?
I used the following statement in my console app:
include <string>
using namespace std;
int main()
{
string a = L"This is a test string.";
/* Here when I type 'a.' the Intellisense should have given me
the methods available for a. But it doesn't why?*/
return 0;
}
My usage may be wrong in the above code. Please correct me. I want to
have all the basic string manipulation functionality like in VB6 but
also don't want to lose UNICODE support.