Possible Duplicate:
Using boolean values in C
I am newbie to C and want to write a program that will detect face from web cam, I got one on line,I am using opencv-2.4.3 on eclipse CDT, I searched on line for the solution but did not get the appropriate solution for my problem so posting it as new question.Here is the code:
 // Include header files
 #include "/home/OpenCV-2.4.3/include/opencv/cv.h"
 #include "/home/OpenCV-2.4.3/include/opencv/highgui.h"
 #include "stdafx.h"
 int main(){
//initialize to load the video stream, find the device
 CvCapture *capture = cvCaptureFromCAM( 0 );
if (!capture) return 1;
//create a window
cvNamedWindow("BLINK",1);
 while (true){
    //grab each frame sequentially
    IplImage* frame = cvQueryFrame( capture );
    if (!frame) break;
    //show the retrived frame in the window
    cvShowImage("BLINK", frame);
    //wait for 20 ms
    int c = cvWaitKey(20);
    //exit the loop if user press "Esc" key
    if((char)c == 27 )break;
}
 //destroy the opened window
cvDestroyWindow("BLINK");
//release memory
cvReleaseCapture(&capture);
return 0;
 }
And I am getting error as true’ undeclared (first use in this function), It is causing problem in while loop, I read it is not good practise to use while(true) but how should I go about. Can anybody hellp me out.
 
     
     
     
     
    