Quantcast
Channel: Off-Topic Posts (Do Not Post Here) forum
Viewing all articles
Browse latest Browse all 14169

Microsoft C++ exception: std::bad_alloc at memory location

$
0
0

Hello,

I use like below code. If I run or start debugging , VS throw an exception that bad alloc at memory location.

Could you tell me please, how can I expand my program's heap/stack size?

cv::Mat testingData;
	cv::Mat trainingData;
	cout << "Reading testing data...." << endl;
	read_data(testingData, "Data/DigitRecognition/", "t10k", false);
	cout << "Reading training data...." << endl;
	read_data(trainingData, "Data/DigitRecognition/", "train", false);
for (int i = 0; i < trainingData.rows; i++) {
		for (int j = 0; j < trainingData.cols; j++) {
			cout << trainingData.at<double>(i , j) << endl;
		}
	}


Viewing all articles
Browse latest Browse all 14169

Trending Articles