c++多線程技術入門

c++多線程技術入門 thread thread 即 進程,它能夠同時執行多個任務,其一大特色是共享內存 ex: 設全局變量 a = 1 ; int main() { a++;thread t1; thread t2;}最終輸出結果應該爲3 ;ios #include < iostream > #include < thread > using namespace std; void fun( )
相關文章
相關標籤/搜索