please help me..
am using turbo c 3.00
i'm gettin a compile time error : Lvalue required.
-------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int func(int x,int y)
{
int *ptr1=&x,*ptr2=&y;
int **ptr_1,**ptr_2;
*ptr_1=ptr1;
*ptr_2=ptr2;
printf("\nUsing function pointer : ");
printf("\nx=%d\ny=%d",**ptr_1,**ptr_2);
int sum=*ptr1+*ptr2;
return sum;
}
main()
{
int *fnptr(int,int); // declare a function pointer
clrscr();
fnptr=&func; //assigning address to fnptr- i get the error here
printf("\nThe sum is %d",fnptr(10,20));
getch();
}