Re: stl string and win32 API
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 10/19/04
- Previous message: Jerry J: "Re: STL exceptions"
- In reply to: Cheng: "Re: stl string and win32 API"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 19 Oct 2004 10:27:59 -0400
"Cheng" <chengwuchew@yahoo.com> wrote in message
news:uFFcufYtEHA.1548@TK2MSFTNGP10.phx.gbl
> If a vector were to be used as a temporary variable, then using plain
> char * as tempoprary variable is the same too. Any comment is
> welcomed.
The difference between using a vector and manually allocating a char*
array, is that vector will automatically free its memory when it goes
out of scope, whereas you have to remember to free the array. One less
chance of introducing a memory leak.
--
With best wishes,
Igor Tandetnik
"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage
- Previous message: Jerry J: "Re: STL exceptions"
- In reply to: Cheng: "Re: stl string and win32 API"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|