Click here to Skip to main content
16,004,944 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Download progressbar implementation Pin
Hamid_RT22-May-07 9:05
Hamid_RT22-May-07 9:05 
Questionplace FlexGrid in ATL window(CWnd Inheritance). Pin
thatsravi21-May-07 23:53
thatsravi21-May-07 23:53 
Questionvector assignment operations Pin
misha_grewal20-May-07 23:02
misha_grewal20-May-07 23:02 
AnswerRe: vector assignment operations Pin
Stuart Dootson21-May-07 0:11
professionalStuart Dootson21-May-07 0:11 
GeneralRe: vector assignment operations Pin
misha_grewal21-May-07 0:27
misha_grewal21-May-07 0:27 
GeneralRe: vector assignment operations Pin
Stuart Dootson21-May-07 4:07
professionalStuart Dootson21-May-07 4:07 
AnswerRe: vector assignment operations Pin
Nemanja Trifunovic23-May-07 1:57
Nemanja Trifunovic23-May-07 1:57 
AnswerRe: vector assignment operations Pin
John R. Shaw29-May-07 3:56
John R. Shaw29-May-07 3:56 
I am confused! Confused | :confused:

Q1) Why are you using new at all? D'Oh! | :doh:

misha_grewal wrote:
3. *pVect = vect;


The objects in pVect are destroyed and then replaced by copies of those stored in vect; the vector will resize its self if needed.

misha_grewal wrote:
Or is it better if I use this code --

// for assignment

if (pVect)
delete pVect;
pVect = new std::Vector(vect)


In this scenario you are wasting time and code:
1) You do not need to use if(pVect) in C++, because delete does that for you. So you would just call delete.
2) See Q1 above.

Note: Using new is rarely required in a well written (standard) C++ program.

INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

QuestionHow much a vector can store? Pin
Pankaj.Jain20-May-07 23:02
professionalPankaj.Jain20-May-07 23:02 
AnswerRe: How much a vector can store? Pin
Stuart Dootson21-May-07 0:07
professionalStuart Dootson21-May-07 0:07 
QuestionDEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
JaeWook Choi18-May-07 10:26
JaeWook Choi18-May-07 10:26 
AnswerRe: DEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
Jörgen Sigvardsson19-May-07 2:06
Jörgen Sigvardsson19-May-07 2:06 
GeneralRe: DEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
JaeWook Choi22-May-07 3:40
JaeWook Choi22-May-07 3:40 
GeneralRe: DEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
Jörgen Sigvardsson22-May-07 3:50
Jörgen Sigvardsson22-May-07 3:50 
GeneralRe: DEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
JaeWook Choi23-May-07 3:47
JaeWook Choi23-May-07 3:47 
GeneralRe: DEP (Data Execution Prevention) in WinXP SP2 and ATL/WTL thunk. Pin
Jörgen Sigvardsson23-May-07 3:56
Jörgen Sigvardsson23-May-07 3:56 
Questionusing mscomm32.ocx in ATL Exe? Pin
viral_umang@hotmail.com18-May-07 0:33
viral_umang@hotmail.com18-May-07 0:33 
QuestionExecuting Javascript in ASPX Pin
darora317-May-07 18:15
darora317-May-07 18:15 
Questionattributed ATL, forward declare interface? Pin
Jared Allen16-May-07 12:29
Jared Allen16-May-07 12:29 
AnswerRe: attributed ATL, forward declare interface? Pin
Michael Dunn18-May-07 14:57
sitebuilderMichael Dunn18-May-07 14:57 
AnswerRe: attributed ATL, forward declare interface? Pin
Jörgen Sigvardsson19-May-07 2:05
Jörgen Sigvardsson19-May-07 2:05 
AnswerRe: attributed ATL, forward declare interface? Pin
Jared Allen19-May-07 8:40
Jared Allen19-May-07 8:40 
Questionhow to convert an interface instance to SAFEARRAY Pin
bioan15-May-07 21:14
professionalbioan15-May-07 21:14 
QuestionHow to pass an array to a COM method that accept a VARIANT * Pin
songll10-May-07 8:28
songll10-May-07 8:28 
AnswerRe: How to pass an array to a COM method that accept a VARIANT * Pin
Stuart Dootson10-May-07 21:04
professionalStuart Dootson10-May-07 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.