起因:
在XP SP2上運行程序,程序報錯誤。
原因:
GetLogicalProcessorInformation 從XP SP3開始加入,以前的系統不支持。
在VS2013中搜索代碼,並沒有使用這個API,也使用XP兼容模式編譯。
原因C++ 11中的線程類中使用了這個API
解決方法:
http://forums.euw.leagueoflegends.com/board/showthread.php?t=1622516
修改好的文件(僅適合VS2013)下載:
起因:
在XP SP2上運行程序,程序報錯誤。
原因:
GetLogicalProcessorInformation 從XP SP3開始加入,以前的系統不支持。
在VS2013中搜索代碼,並沒有使用這個API,也使用XP兼容模式編譯。
原因C++ 11中的線程類中使用了這個API
解決方法:
http://forums.euw.leagueoflegends.com/board/showthread.php?t=1622516
修改好的文件(僅適合VS2013)下載:
數組求和 方法一:直接一次for循環 int GetSum1(int *a,int n) { int sum=0; for (int i=0; i<n;i++) { sum+=a[i];