opencv 4 CV_CAP_PROP_FPS not defined c++ code example

Example: error: ‘CAP_PROP_FPS’ was not declared in this scope

PROBLEM:
--------
prashad@ubuntu:~/test/open_camera$ g++ -g read_video_file_opencv.cpp `pkg-config --cflags --libs opencv` 
read_video_file_opencv.cpp: In function ‘int main(int, char**):
read_video_file_opencv.cpp:24:23: error: ‘CAP_PROP_FPS’ was not declared in this scope
  double fps = cap.get(CAP_PROP_FPS);
                       ^~~~~~~~~~~~
read_video_file_opencv.cpp:24:23: note: suggested alternative: ‘CV_CAP_PROP_FPS’
  double fps = cap.get(CAP_PROP_FPS);
                       ^~~~~~~~~~~~
                       CV_CAP_PROP_FPS
SOLUTION:
---------
Try to replace CAP_PROP_FPS to CV_CAP_PROP_FPS   <<< "CV_" prefix helps. compilation would be success

Tags:

C Example