i have the following program and this is the error i am getting
illegal, right operand has type 'double *
how do i fix it
Code:
#include<stdlib.h>
#include<stdio.h>
void cube(double* pVariable);
main(){
double variable=3.43;
int* pVariable;
printf("Value of variable is %.2lf\n",variable);
printf("Address of variable is %p\n",&variable);
pVariable=&variable;
cube(&variable);
system("Pause");
}
void cube(double *pVariable){
printf("The number %.2lf\n",pVariable);
pVariable=*pVariable*pVariable*pVariable;
}