Re: Declaration and definition in C++. Difference between declaration and Definition Declaration
It just indicate the presence of a variable or memberfunction and ends with a semi-colon. For eg;
int i;-->declaration
add();--->declaration Definition
It explains the behaviour of the function.If it is a variable it defines its value. For eg:
int i=2;--->It is definition of a variable
add()--------->Definition
{
int a=2,b=3,c;
c=a+b;
} |