in vs2022 go to the project settings then c/c++ then preprocessor then click on the arrow at the end of the line with the name "preprocessor definitions" then add the '_CRT_SECURE_NO_WARNINGS'