Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SOS!!! Pin
9-Jul-01 23:57
suss9-Jul-01 23:57 
GeneralRe: SOS!!! Pin
coder847210-Jul-01 0:30
coder847210-Jul-01 0:30 
GeneralMouse moving Pin
9-Jul-01 22:42
suss9-Jul-01 22:42 
GeneralRe: Mouse moving Pin
NormDroid9-Jul-01 23:12
professionalNormDroid9-Jul-01 23:12 
GeneralRe: Mouse moving Pin
9-Jul-01 23:42
suss9-Jul-01 23:42 
GeneralRe: Mouse moving Pin
9-Jul-01 23:50
suss9-Jul-01 23:50 
GeneralRe: Mouse moving Pin
Christian Graus9-Jul-01 23:53
protectorChristian Graus9-Jul-01 23:53 
GeneralWeired problem in using std library Pin
9-Jul-01 22:35
suss9-Jul-01 22:35 
Hello,

I created an application which using std::map, and std:vector. I declare them as

<br />
#typedef std::map<long, CSTRUCTA *> CSTRUCTALIST;<br />
#typedef std::map<long, CSTRUCTB *> CSTRUCTBLIST;<br />
<br />
class CMyClass<br />
{<br />
public:<br />
  CMyClass();<br />
<br />
  static UINT ThreadProcA(DWORD pParam);<br />
  static UINT ThreadProcB(DWORD pParam);<br />
<br />
private:<br />
  CSTRUCTALIST m_Vector1;<br />
  CSTRUCTBLIST m_Vector2;<br />
};<br />
<br />


I didn't do anting on the m_Vector1, and m_Vector2 in the constructor, then i let the threads running, but in ThreadProcB, I'm doing something like:

<br />
  for (itr = m_Vector1.begin(); itr != m_Vector1.end(); itr++)<br />
  {<br />
      //doing something<br />
  }<br />


As I didn't add anying to the m_Vector1, so it should contains nothing, but it can still enter the //doing something block and raise exception.
I tried use m_Vector1.size() to see the elements in the vector, it showed me -6xxxx, seems like rubblish value. incredible!

Anyone knows what's wrong ???

I'm using VC6, SP4
GeneralRe: Weired problem in using std library Pin
Tomasz Sowinski10-Jul-01 0:36
Tomasz Sowinski10-Jul-01 0:36 
GeneralRe: Weired problem in using std library Pin
10-Jul-01 15:42
suss10-Jul-01 15:42 
GeneralImplement Dynamic & multiple inheritance Pin
9-Jul-01 21:49
suss9-Jul-01 21:49 
GeneralRe: Implement Dynamic & multiple inheritance Pin
Tomasz Sowinski10-Jul-01 0:39
Tomasz Sowinski10-Jul-01 0:39 
QuestionHow to modify DocString at runtime? Pin
9-Jul-01 21:32
suss9-Jul-01 21:32 
AnswerRe: How to modify DocString at runtime? Pin
Tomasz Sowinski10-Jul-01 0:42
Tomasz Sowinski10-Jul-01 0:42 
GeneralRe: How to modify DocString at runtime? Pin
10-Jul-01 3:01
suss10-Jul-01 3:01 
GeneralCustom Drawn Close, Maximize and Minimize buttons Pin
Andreas Philipson9-Jul-01 20:29
Andreas Philipson9-Jul-01 20:29 
GeneralRe: Custom Drawn Close, Maximize and Minimize buttons Pin
9-Jul-01 23:39
suss9-Jul-01 23:39 
GeneralRe: Custom Drawn Close, Maximize and Minimize buttons Pin
Andreas Philipson9-Jul-01 23:43
Andreas Philipson9-Jul-01 23:43 
QuestionHow to broadcast in same LAN with Socket? Pin
9-Jul-01 19:48
suss9-Jul-01 19:48 
AnswerRe: How to broadcast in same LAN with Socket? Pin
markkuk9-Jul-01 20:49
markkuk9-Jul-01 20:49 
QuestionTemplates errors I found and fix. But a quest...Why the errors? Pin
CMFC6.0VS.NETUser9-Jul-01 18:33
CMFC6.0VS.NETUser9-Jul-01 18:33 
AnswerRe: Templates errors I found and fix. But a quest...Why the errors? Pin
9-Jul-01 19:36
suss9-Jul-01 19:36 
GeneralRe: Templates errors I found and fix. But a quest...Why the errors? Pin
9-Jul-01 21:55
suss9-Jul-01 21:55 
AnswerRe: Templates errors I found and fix. But a quest...Why the errors? Pin
CMFC6.0VS.NETUser10-Jul-01 4:46
CMFC6.0VS.NETUser10-Jul-01 4:46 
GeneralCArchive Pin
XioPeng9-Jul-01 14:52
XioPeng9-Jul-01 14:52 

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.