情景: 今天写了一个简单的函数,却老时在运行期的时候,退栈出错。。
错误提示框如下:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
定义了一个线程类,同时别处也定义了一个此方法
然后运行的时候正常,但是退出的时候总提示上述错误。度娘一下,原来是也要加上WINAPI,加上之后果然不报错了。
遇到此问题只能说明C++基础太菜了,哈哈……
本文链接:https://www.it72.com/12413.htm