Click here to Skip to main content
15,867,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Software Engineer (C++) needed in Singapore!! Pin
Arun S J18-Nov-12 18:27
Arun S J18-Nov-12 18:27 
QuestionError MSB6006: "CL.exe" Pin
john563213-Nov-12 22:41
john563213-Nov-12 22:41 
QuestionRe: Error MSB6006: "CL.exe" Pin
David Crow14-Nov-12 3:23
David Crow14-Nov-12 3:23 
QuestionUDP ports 500 and 4500 are busy? Pin
v_iv13-Nov-12 18:46
v_iv13-Nov-12 18:46 
AnswerRe: UDP ports 500 and 4500 are busy? Pin
Richard MacCutchan13-Nov-12 22:34
mveRichard MacCutchan13-Nov-12 22:34 
QuestionMessage Removed Pin
13-Nov-12 5:47
joe vim13-Nov-12 5:47 
GeneralMessage Removed Pin
13-Nov-12 5:43
joe vim13-Nov-12 5:43 
QuestionI am Bemused about std::list<> Pin
yu-jian13-Nov-12 4:17
yu-jian13-Nov-12 4:17 
C++
// Define 
std::list<SMyFrameData*>    m_FrameList;
CCriticalSection	m_FrameListLock;
... 

        //Pop the frame data from the font of list.
	CTempLock tempLock(&m_FrameListLock);
	if (m_FrameList.size() == 0) return 0L;

	pFrameData = m_FrameList.front();
	m_FrameList.pop_front();
        ... Decoder the frame data


C++
        // use following code to push the frame data to the list.
        SMyFrameData* pNewFrame = new SMyFrameData();
pNewFrame->lpData = pBuf;
pNewFrame->iSize =   iSize;

CTempLock (&(pProcess->m_FrameListLock));
pProcess->m_FrameList.push_back(pNewFrame);
SetEvent(pProcess->m_hFrameProcessEvent);


But now there is a error happen "erators and references can become invalid." in code, pFrameData = m_FrameList.front(); I just use the CCriticalSection to avoid the conflict, but why the error happen.
AnswerRe: I am Bemused about std::list<> Pin
Richard MacCutchan13-Nov-12 5:37
mveRichard MacCutchan13-Nov-12 5:37 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt13-Nov-12 6:03
Stephen Hewitt13-Nov-12 6:03 
GeneralRe: I am Bemused about std::list<> Pin
yu-jian13-Nov-12 6:25
yu-jian13-Nov-12 6:25 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan13-Nov-12 6:38
mveRichard MacCutchan13-Nov-12 6:38 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt13-Nov-12 15:04
Stephen Hewitt13-Nov-12 15:04 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan13-Nov-12 20:59
mveRichard MacCutchan13-Nov-12 20:59 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt13-Nov-12 23:54
Stephen Hewitt13-Nov-12 23:54 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan13-Nov-12 23:58
mveRichard MacCutchan13-Nov-12 23:58 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt14-Nov-12 0:58
Stephen Hewitt14-Nov-12 0:58 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan14-Nov-12 1:30
mveRichard MacCutchan14-Nov-12 1:30 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt14-Nov-12 2:06
Stephen Hewitt14-Nov-12 2:06 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan14-Nov-12 2:26
mveRichard MacCutchan14-Nov-12 2:26 
GeneralRe: I am Bemused about std::list<> Pin
Stephen Hewitt14-Nov-12 2:30
Stephen Hewitt14-Nov-12 2:30 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan14-Nov-12 3:36
mveRichard MacCutchan14-Nov-12 3:36 
GeneralRe: I am Bemused about std::list<> Pin
David Crow14-Nov-12 3:16
David Crow14-Nov-12 3:16 
GeneralRe: I am Bemused about std::list<> Pin
Richard MacCutchan14-Nov-12 3:32
mveRichard MacCutchan14-Nov-12 3:32 
GeneralRe: I am Bemused about std::list<> Pin
yu-jian13-Nov-12 6:25
yu-jian13-Nov-12 6:25 

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.