我对C++和SDL很新,我正在尝试创建一个不断更新屏幕的线程,但我不断收到以下错误:
'std :: invoke找不到匹配的重载函数'
和
'无法专门化函数模板'unknown-type std :: invoke(Callable &&,_ Types && ...)''
main.cpp中
int main(int argc, char **argv) {
using namespace std::placeholders;
bool gameover = false;
int test;
std::string filepath = getResourcePath("Lesson1");
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) { // Intializes SDL functionality
std::cout << "Could not start SDL" << std::endl;
std::cin >> test;
return 1;
}
else {
std::cout << "SDL started successfully!" << std::endl;
}
viewWindow window; // Class representing the window in which the program is run.
SDL_Renderer …Run Code Online (Sandbox Code Playgroud)