?? numbers.cpp
字號:
/*
* Numbers.cpp
*
* Sample code for "Multithreading Applications in Win32"
* This is from Chapter 10, Listing 10-1
*
* Demonstrate basic thread startup in MFC
* using AfxBeginThread.
*
* Compile with the IDE or: nmake -f numbers.mak
*/
#include <afxwin.h>
CWinApp TheApp;
UINT ThreadFunc(LPVOID);
int main()
{
for (int i=0; i<5; i++)
{
if (AfxBeginThread( ThreadFunc, (LPVOID)i ))
printf("Thread launched %d\n", i);
}
// Wait for the threads to complete.
Sleep(2000);
return 0;
}
UINT ThreadFunc(LPVOID n)
{
for (int i=0;i<10;i++)
printf("%d%d%d%d%d%d%d%d\n",n,n,n,n,n,n,n,n);
return 0;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -