CrystalDiskInfo icon indicating copy to clipboard operation
CrystalDiskInfo copied to clipboard

error C2039: 'srand': is not a member of 'std'

Open jianwu13 opened this issue 10 months ago • 1 comments

1>E:\gitwork_win\CrystalDiskInfo\Priscilla\MainDialogFx.cpp(255,7): error C2039: 'srand': is not a member of 'std' 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\ctime(21,1): message : see declaration of 'std' 1>E:\gitwork_win\CrystalDiskInfo\Priscilla\MainDialogFx.cpp(540,20): error C2039: 'rand': is not a member of 'std' 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\ctime(21,1): message : see declaration of 'std' 1>StaticFx.cpp 1>UtilityFx.cpp 1>Done building project "DiskInfo.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

srand is in which you did not include.

diff --git a/Priscilla/MainDialogFx.cpp b/Priscilla/MainDialogFx.cpp index 7cf4ddd..7462fbb 100644 --- a/Priscilla/MainDialogFx.cpp +++ b/Priscilla/MainDialogFx.cpp @@ -8,6 +8,9 @@ #include "../stdafx.h" #include "MainDialogFx.h" #include +// ADD start kan 2023/09/05 +#include +// ADD end kan 2023/09/05

CMainDialogFx::CMainDialogFx(UINT dlgResouce, CWnd* pParent) :CDialogFx(dlgResouce, pParent)

jianwu13 avatar Sep 05 '23 13:09 jianwu13