DEVC++
thread:no type named 'type' in 'class std::result_of<void (*())(HWND__*)>'
原因:含参函数未加参数,如:
#include <iostream>
#include <Thread>
using namespace std;
void fun1(int i){
cout << i << endl;
}
int main(){
thread t1(fun1);
t1.detach();
return 0;
}
这个报错老是报到其他文件,让人找不到真正的错误在哪
本文详细解析了在使用DEVC++编译器时遇到的thread类型错误,重点讲解了如何修复含参函数未正确传递参数导致的问题,并提供查找和定位错误的技巧。

1298

被折叠的 条评论
为什么被折叠?



