Error running facedetect.cpp sample in window c++

Hi
I have just started to learn opencv and I have installed the opencv-4.5.5 and opencv-contrib4.x on my window 10 and with codeblocks IDE. I have also copied and built the facedetect.cpp codes with codeblocks. When I run the codes, these warning (as shown below) was shown on the command prompt window.

Below are the warning shown on the command prompt window

[ WARN:0@0.009] global C:\Users\user\OpenCVProject\OpenCV\source\opencv-4.5.5\modules\core\src\utils\samples.cpp (61) findFile cv::samples::findFile('data/haarcascades/haarcascade_eye_tree_eyeglasses.xml') => 'C:\Users\user\OpenCVProject\OpenCV\source\data/haarcascades/haarcascade_eye_tree_eyeglasses.xml'
[ WARN:0@0.028] global C:\Users\user\OpenCVProject\OpenCV\source\opencv-4.5.5\modules\core\src\utils\samples.cpp (61) findFile cv::samples::findFile('data/haarcascades/haarcascade_frontalface_alt.xml') => 'C:\Users\user\OpenCVProject\OpenCV\source\data/haarcascades/haarcascade_frontalface_alt.xml'
Capture from camera #0 didn't work
Process returned 1 (0x1)   execution time : 0.160 s
Press any key to continue.

I have set the OPENCV_SAMPLES_DATA_PATH=C:\Users\user\OpenCVProject\OpenCV\source
I notice these warnings are errors on the facedetect.cpp codes (lines 41 and 42).

/**** Program codes on facedetec.cpp line 41 and 42  
       "{cascade|data/haarcascades/haarcascade_frontalface_alt.xml|}"
        "{nested-cascade|data/haarcascades/haarcascade_eye_tree_eyeglasses.xml|}"
*************************/

This is because in the code it uses the forward slash (/) but in window platform it require a backslash () to seperate the folders or file name. So I replaced the forward slash (/) with the backslash (), build and run the codes again. Still warnings shown (as below). The warning stated below shows that if refers to the correct path now cv::samples::‘C:\Users\user\OpenCVProject\OpenCV\source\data\haarcascades\haarcascade_eye_tree_eyeglasses.xml’ but no picture displayed. I am stuck here, please advise. Could someone help. (Note : my PC do not have camera)

Below are the warnings shown on the command prompt window

[ WARN:0@0.008] global C:\Users\user\OpenCVProject\OpenCV\source\opencv-4.5.5\modules\core\src\utils\samples.cpp (61) findFile cv::samples::findFile('data\haarcascades\haarcascade_eye_tree_eyeglasses.xml') => 'C:\Users\user\OpenCVProject\OpenCV\source\data\haarcascades\haarcascade_eye_tree_eyeglasses.xml'
[ WARN:0@0.027] global C:\Users\user\OpenCVProject\OpenCV\source\opencv-4.5.5\modules\core\src\utils\samples.cpp (61) findFile cv::samples::findFile('data\haarcascades\haarcascade_frontalface_alt.xml') => 'C:\Users\user\OpenCVProject\OpenCV\source\data\haarcascades\haarcascade_frontalface_alt.xml'
Capture from camera #0 didn't work

Process returned 1 (0x1)   execution time : 0.136 s
Press any key to continue

(and that’s why your program stopped)

well you need at least an input image then, call your program like:

facedetect.exe image_with_face.png