Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

printf output is too late

Hi, i have the following code:

enter code here

include "highgui.h"

include "stdio.h"

using namespace std;

const char* name="Example1";

int main(int argc, char** argv) {

IplImage* img = cvLoadImage(argv[1]);

cvNamedWindow( name, CV_WINDOW_AUTOSIZE);

cvShowImage( name, img);

printf("HelloWorld...");

cvWaitKey(0);

cvReleaseImage(&img);

cvDestroyWindow (name);

}

enter code here

It is all working but the "HelloWorld" is not written until I press a key. I don't understand why it is not written before.

ciao, Andre

printf output is too late

Hi, i have the following code:

enter code here

include "highgui.h"

include "stdio.h"

#include "highgui.h" #include "stdio.h" using namespace std;

std;

const char* name="Example1";

name="Example1";

int main(int argc, char** argv) {

{
IplImage* img = cvLoadImage(argv[1]);
  cvNamedWindow( name, CV_WINDOW_AUTOSIZE);
  cvShowImage( name, img);
  printf("HelloWorld...");
  cvWaitKey(0);
  cvReleaseImage(&img);
  cvDestroyWindow (name);

}

enter code here
}

It is all working but the "HelloWorld" is not written until I press a key. I don't understand why it is not written before.

ciao, Andre