1 | initial version |
The reason is that stdout is buffered. If you want to print it directly, write to stderr instead of stdout (if you really want to use C instead of C++ this would work with fprintf(stderr, "HelloWorld...")); or flush the buffer, should be working with a simple newline at the end: "HelloWorld\n".
Note: I highly recommend to switch to C++! OpenCV has mainly switched to it and you will have it a lot easier w. coding (std::cerr and std::cout ftw, and of course cv::Mat instead of IplImage/CvMat)!