Open CV C++ Exception cv::Octree::Node::children' is uninitialized. Always initialize a member variable (type.6)

I am trying to detect edges on a sample input image with open cv C++ implementation, my environment is Visual C++ with Visual Studio. I installed the library from the Nuget package manager. I added the header #include <opencv2/opencv.hpp> to the top of my source file and no error have been generated. Then I tried to use the code below to detect the edges on the image.

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <opencv2/opencv.hpp>

//entry point of the program
int main() {
	printf("%s\n", "This command line program is for performing a variety of image processing functions on a sample image");
	//to change the input image, change it from the resources folder in visual studio
	//define the path to the image
	char name[13] = "original.jpg";
	//check if the image file exists
	FILE* file = fopen(name,"r");
	if (file == NULL) {
		printf("%s", "Image file not found");
		//exit the script 
		return 987;
	}
	//if the script passes this point then the image file has been located
	//define the pointers for the input and output cv arrays
	cv::Mat image ;
	cv::Mat  edges;
	image = cv::imread(name, cv::IMREAD_GRAYSCALE);
	//call the function to detect the edges
	cv::Canny(image, edges, 200, 200);
	//display the image with edges in a named window
	cv::namedWindow("Edges", cv::WINDOW_AUTOSIZE);
	cv::imshow("image", edges);

	return 0;
}

But Visual Studio is throwing an error that cv::Octree::Node::children’ is uninitialized. Always initialize a member variable (type.6). CImages C:\Users\HP\source\repos\CImages\packages\OpenCV.2.4.11\build\native\include\opencv2\contrib\contrib.hpp, how can I resolve this error and get the compiler to compile my program successfully?

sadly, not maintained from opencv, thus:

outdated, eol, no more maintained. do not use !

code does no more exist in recent codebase
(there even is no contrib module anymore)

please, reconsider.
you don’t want to build anything new on such a deprecated base

Thanks, where can I download the C++ open cv library with the lib and include folder so that I can add the dependency to my project and Thank You for your time and effort replying to this.

octree in opencv 5.x for 3D vision

The file is a software setup for windows. Does it have the necessary lib and include folders for adding to the VC++ directories?