Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望每三秒调用一次函数。在objective-c中,我会这样做:
NSTimer timer = [NSTimer timerWithInterval:3 sel:@selector(my_function)...];
如何使用 SDL 和 c++ 做到这一点?我试过这个:
SDL_TimerID myTimer = SDL_AddTimer(3,my_function(), NULL);
但我只是得到一个错误,上面写着:没有匹配函数调用 SDL_AddTimer。
怎么了?