I have written this simple code to measure the time duration it takes for a user to input the data for calculation. Please help me and correct this program. I shall stay thankful..
//To calculate time duration it takes to perform an operation of addition
#include <iostream>
#include <conio>
#include <time.h>
int main()
{
int a,b,c;
int start, finish;
clock_t start (clock()); //THIS LINE IS GIVING ME ERROR!!
cout<<"Enter digit";
cin>>a;
cout<<"\nEnter digit";
cin>>b;
c = a+b;
clock_t finish (clock()); //THIS LINE IS ALSO GIVING ME ERROR!!
cout<<"Time to calculate sum is:"<<(finish-start)/1000.0<< "seconds";
cout<<c;
getche();
}