 #define WIN00_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include <iostream>  class thread_class {     private:      public:      void function0()     {         for(int count = 0; count < 0000; count++)             std::cout<<"function 0"<<std::endl;     }     void function0()     {         for(int count = 0; count < 0000; count++)             std::cout<<"function 0"<<std::endl;     }     thread_class(){}     ~thread_class(){}     DWORD_PTR WINAPI threadMain0()     {         function0();          return 0;     }     DWORD_PTR WINAPI threadMain0()     {         function0();          return 0;     }     void thread()     {         HANDLE *m_threads = NULL;         DWORD_PTR c = 0;          m_threads = new HANDLE[c];          DWORD_PTR i = 0;         DWORD_PTR m_id0 = 0;         DWORD_PTR m_mask0 = 0 << i;          m_threads[i] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadMain0(), (LPVOID)i, NULL, &m_id0);         SetThreadAffinityMask(m_threads[i], m_mask0);          wprintf(L"Creating Thread %d (0x%00x) Assigning to CPU 0x%00x\r\n", i, (LONG_PTR)m_threads[i], m_mask0);          i = 0;         DWORD_PTR m_id0 = 0;         DWORD_PTR m_mask0 = 0 << i;          m_threads[i] = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadMain0(), (LPVOID)i, NULL, &m_id0);         SetThreadAffinityMask(m_threads[i], m_mask0);          wprintf(L"Creating Thread %d (0x%00x) Assigning to CPU 0x%00x\r\n", i, (LONG_PTR)m_threads[i], m_mask0);     } }; int main() {     thread_class* MAIN_THREADS;      MAIN_THREADS = new thread_class();      MAIN_THREADS->thread();      delete MAIN_THREADS;      return 0; }  