Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionGet window handle? Pin
Lord Kixdemp18-Dec-05 12:01
Lord Kixdemp18-Dec-05 12:01 
AnswerRe: Get window handle? Pin
PJ Arends18-Dec-05 12:23
professionalPJ Arends18-Dec-05 12:23 
GeneralRe: Get window handle? Pin
Lord Kixdemp18-Dec-05 13:47
Lord Kixdemp18-Dec-05 13:47 
GeneralRe: Get window handle? Pin
Lord Kixdemp18-Dec-05 16:36
Lord Kixdemp18-Dec-05 16:36 
QuestionHow to detect screen saver Pin
PJ Arends18-Dec-05 12:00
professionalPJ Arends18-Dec-05 12:00 
AnswerRe: How to detect screen saver Pin
Owner drawn18-Dec-05 18:21
Owner drawn18-Dec-05 18:21 
GeneralRe: How to detect screen saver Pin
PJ Arends18-Dec-05 20:42
professionalPJ Arends18-Dec-05 20:42 
QuestionMemory assertion with std::vector .. Pin
selecta18-Dec-05 8:49
selecta18-Dec-05 8:49 
Hello,

I don't know what is wrong with my code. I got assertion of memory. Thank you very much for your help Smile | :)


In example.h
<br />
typedef MyType struct<br />
      { int one; int two};<br />
<br />


In my example.cpp:
<br />
void main(void)<br />
{<br />
  std::vector<<MyType>> toto;<br />
  toto.reserve(10);<br />
  PlayWithToto(&toto);   // here i 've got no assertion messages<br />
  toto.clear();<br />
<br />
}  <= here I've got an assertion ! (even if I don't call toto.clear()<br />
void PlayWithToto(std::vector<<MyType>> *titi)<br />
{<br />
   MyType temp;<br />
   temp.one = 1;<br />
   temp.two = 2;<br />
<br />
   titi->push_back(temp);<br />
}


-- modified at 14:53 Sunday 18th December, 2005
AnswerRe: Memory assertion with std::vector .. Pin
Jörgen Sigvardsson18-Dec-05 8:56
Jörgen Sigvardsson18-Dec-05 8:56 
GeneralRe: Memory assertion with std::vector .. Pin
selecta18-Dec-05 10:25
selecta18-Dec-05 10:25 
GeneralRe: Memory assertion with std::vector .. Pin
Jörgen Sigvardsson18-Dec-05 10:29
Jörgen Sigvardsson18-Dec-05 10:29 
GeneralRe: Memory assertion with std::vector .. Pin
selecta18-Dec-05 11:03
selecta18-Dec-05 11:03 
GeneralRe: Memory assertion with std::vector .. Pin
Jörgen Sigvardsson18-Dec-05 11:15
Jörgen Sigvardsson18-Dec-05 11:15 
GeneralRe: Memory assertion with std::vector .. Pin
selecta18-Dec-05 11:23
selecta18-Dec-05 11:23 
GeneralRe: Memory assertion with std::vector .. Pin
Jörgen Sigvardsson18-Dec-05 11:30
Jörgen Sigvardsson18-Dec-05 11:30 
GeneralRe: Memory assertion with std::vector .. Pin
PJ Arends18-Dec-05 12:17
professionalPJ Arends18-Dec-05 12:17 
GeneralRe: Memory assertion with std::vector .. Pin
selecta18-Dec-05 13:24
selecta18-Dec-05 13:24 
QuestionHow to interface PC Addon Cards using vc++ Pin
sreewiz18-Dec-05 6:24
sreewiz18-Dec-05 6:24 
QuestionOverride ListCtrl automatic horizontal scrolling on Left/Right KeyDown Pin
Maverick18-Dec-05 4:59
Maverick18-Dec-05 4:59 
QuestionPublishing an Visual C++ Exe Pin
Tazzu18-Dec-05 4:12
Tazzu18-Dec-05 4:12 
QuestionDetecting 3rd party firewall Pin
vinoth355618-Dec-05 1:08
vinoth355618-Dec-05 1:08 
QuestionIterators, NULL and Visual Studio 2005 Pin
Franz Klein17-Dec-05 23:06
Franz Klein17-Dec-05 23:06 
AnswerRe: Iterators, NULL and Visual Studio 2005 Pin
Kevin McFarlane18-Dec-05 0:49
Kevin McFarlane18-Dec-05 0:49 
GeneralRe: Iterators, NULL and Visual Studio 2005 Pin
Bob Stanneveld18-Dec-05 2:49
Bob Stanneveld18-Dec-05 2:49 
GeneralRe: Iterators, NULL and Visual Studio 2005 Pin
Kevin McFarlane18-Dec-05 3:20
Kevin McFarlane18-Dec-05 3:20 

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.