Click here to Skip to main content
15,926,703 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How Can I Get Text Under Mouse ? Pin
cp987617-Mar-07 16:23
cp987617-Mar-07 16:23 
GeneralRe: How Can I Get Text Under Mouse ? [modified] Pin
ngooduwcs17-Mar-07 17:12
ngooduwcs17-Mar-07 17:12 
QuestionRe: How Can I Get Text Under Mouse ? Pin
David Crow17-Mar-07 17:21
David Crow17-Mar-07 17:21 
AnswerRe: How Can I Get Text Under Mouse ? Pin
David Crow17-Mar-07 17:17
David Crow17-Mar-07 17:17 
AnswerRe: How Can I Get Text Under Mouse ? Pin
Michael Dunn17-Mar-07 18:35
sitebuilderMichael Dunn17-Mar-07 18:35 
QuestionHow can add a menu selection Pin
Member 378635617-Mar-07 14:59
Member 378635617-Mar-07 14:59 
Questionv. clear() ? Pin
Yonggoo17-Mar-07 8:25
Yonggoo17-Mar-07 8:25 
AnswerRe: v. clear() ? Pin
toxcct17-Mar-07 8:53
toxcct17-Mar-07 8:53 
since you didn't use &lt; and &gt; rather than < and > respectedly, i cannot know what your vactor contains. so if my answer is not accurate, please fix your question.

the std::vector<>::clear() function clears the vector, but nowhere calls the objects destructors.

if your vector contains objects (like std::vector<MyType>), then you manage the life of the objects. calling clear() will only remove the reference (actually, the copy) of the obect in the vector.

if your vector contains pointers (like std::vector<MyType*>), you have to be more than careful because memory leak are close to occur; especially if you allocated dynamically using new. Using such vectors, you must first iterate over the vector to delete all the contained pointers, and only then call clear().

ps: please also use <pre></pre> tags when posting code sample so that you keep being formated correctly


GeneralRe: v. clear() ? Pin
David Crow17-Mar-07 17:23
David Crow17-Mar-07 17:23 
GeneralRe: v. clear() ? Pin
toxcct17-Mar-07 22:00
toxcct17-Mar-07 22:00 
AnswerRe: v. clear() ? Pin
Stephen Hewitt18-Mar-07 0:23
Stephen Hewitt18-Mar-07 0:23 
QuestionChange the project font Pin
Joe Smith IX17-Mar-07 7:44
Joe Smith IX17-Mar-07 7:44 
AnswerRe: Change the project font Pin
PJ Arends17-Mar-07 10:53
professionalPJ Arends17-Mar-07 10:53 
GeneralRe: Change the project font Pin
Joe Smith IX17-Mar-07 18:19
Joe Smith IX17-Mar-07 18:19 
GeneralRe: Change the project font Pin
PJ Arends17-Mar-07 21:04
professionalPJ Arends17-Mar-07 21:04 
GeneralRe: Change the project font Pin
Joe Smith IX18-Mar-07 2:08
Joe Smith IX18-Mar-07 2:08 
QuestionRe: Change the project font Pin
David Crow17-Mar-07 17:25
David Crow17-Mar-07 17:25 
AnswerRe: Change the project font Pin
Joe Smith IX17-Mar-07 18:24
Joe Smith IX17-Mar-07 18:24 
GeneralRe: Change the project font Pin
David Crow18-Mar-07 16:25
David Crow18-Mar-07 16:25 
QuestionUNIX EOL on Visual Studio (VC++) 6.0 Pin
BengaluruTechie17-Mar-07 6:24
BengaluruTechie17-Mar-07 6:24 
AnswerRe: UNIX EOL on Visual Studio (VC++) 6.0 Pin
toxcct17-Mar-07 8:46
toxcct17-Mar-07 8:46 
QuestionException Handling... Pin
_808617-Mar-07 5:35
_808617-Mar-07 5:35 
AnswerRe: Exception Handling... Pin
Steve Echols17-Mar-07 6:32
Steve Echols17-Mar-07 6:32 
GeneralRe: Exception Handling... Pin
_808617-Mar-07 6:47
_808617-Mar-07 6:47 
GeneralRe: Exception Handling... Pin
toxcct17-Mar-07 8:44
toxcct17-Mar-07 8:44 

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.