From c0cd3172843e4f4e5c604ec28cd8fa72f087403a Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Thu, 11 Aug 2011 07:04:27 +0000 Subject: [PATCH] fixed compile errors in samples --- samples/cpp/demhist.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/cpp/demhist.cpp b/samples/cpp/demhist.cpp index 9f524a8926..d71ea5c858 100644 --- a/samples/cpp/demhist.cpp +++ b/samples/cpp/demhist.cpp @@ -56,9 +56,8 @@ void updateBrightnessContrast( int /*arg*/, void* ) } void help() { - printf("\nThis program demonstrates the use of calcHist() -- histogram creation.\n" - "Usage: \n" - "demhist [image_name -- Defaults to baboon.jpg]\n"); + std::cout << "\nThis program demonstrates the use of calcHist() -- histogram creation.\n" + << "Usage: \n" << "demhist [image_name -- Defaults to baboon.jpg]" << std::endl; } const char* keys = @@ -77,7 +76,7 @@ int main( int argc, const char** argv ) image = imread( inputImage, 0 ); if(image.empty()) { - printf("Cannot read image file: %s\n", inputImage.c_str()); + std::cerr << "Cannot read image file: " << inputImage << std::endl; return -1; }