Code:void CSound::MonitorSoundArray() { for(int i = 0; i < vSound.size(); i++) { DWORD dwCurTime = GetTickCount(); if((dwCurTime - vSound[i].dwTime) > 2000) { vSound.erase(&vSound[i]); i--; } } }
Code:void CSound::MonitorSoundArray() { for(int i = 0; i < vSound.size(); i++) { DWORD dwCurTime = GetTickCount(); if((dwCurTime - vSound[i].dwTime) > 2000) { vSound.erase(&vSound[i]); i--; } } }
Using a linked list would probably be faster![]()
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
The last hurrah? Nah! I'd do it again
The Rascal King behind the bars
Or the one in front of them
There are currently 1 users browsing this thread. (0 members and 1 guests)