?? intarray.cpp
字號:
// IntArray.cpp: implementation of the CIntArray class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ThreadTest.h"
#include "IntArray.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIntArray::CIntArray()
{
}
CIntArray::~CIntArray()
{
}
void CIntArray::SetArray(int value)
{
criticalSection.Lock();
for (int x=0; x<10; ++x)
{
// ::Sleep(500);
array[x] = value;
}
criticalSection.Unlock();
}
void CIntArray::GetArray(int dstArray[10])
{
criticalSection.Lock();
for (int x=0; x<10; ++x)
dstArray[x] = array[x];
criticalSection.Unlock();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -