Hi everybody,
I am including some C code in R program using the .C interface.
I would like use a C subfunction calling by C void function.

/double essai (double Px[], int tailleP)
{
        Rprintf ("I print Px %d\t", Px[1]);
        return 57;
}

void test_essai (double *Px, int *tailleP, double *res)
{
        *res = essai(*Px, *tailleP);
}/

This program doesn’t work. When I compile it, I have the following error : 
“In function ‘test_essai :
-       Error: incompatible type for argument 1 of ‘essai’
-       Note : expected ‘double*’ but argument is of type ‘double’ ”

Does anyone have solution ? 
Thank all, Elie 




--
View this message in context: 
http://r.789695.n4.nabble.com/problem-when-I-Call-C-subfunction-in-void-function-tp4696073.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to