errors gsl librabry and lhapdf functions ; lhapf xfx(x,Q^2,#f) used oustide the main()
I have to integrate over x using Monte Carlo miser a function which returns the xfx(x,Q^2,#f) for various values of Qs.
I have defined a function something like:
#include <math.h>
#include "LHAPDF/LHAPDF.h"
#include <iterator>
#include <iostream>
#include <cstdlib>
using namespace std;
#include <iomanip>
#include <fstream>
#include <gsl/gsl_math.h>
#include <gsl/gsl_monte.h>
#include <gsl/gsl_
double g(double *x, size_t dim, double *par)
{
struct my_f_params * fp = (struct my_f_params *)par;
double mz=91.1;
double Q=fp->a*
double A=6*10*
double B=A*(LHAPDF:
return B;
}
But I am getting loads of errors:
sa.C: In function ‘double g(double*, size_t, double*)’:
sa.C:31:12: error: invalid use of incomplete type ‘struct g(double*, size_t, double*
double Q=fp->a*
^
sa.C:28:9: error: forward declaration of ‘struct g(double*, size_t, double*
struct my_f_params * fp = (struct my_f_params *)par;
^
sa.C:31:18: error: invalid use of incomplete type ‘struct g(double*, size_t, double*
double Q=fp->a*
sa.C:28:9: error: forward declaration of ‘struct g(double*, size_t, double*
struct my_f_params * fp = (struct my_f_params *)par;
^
sa.C:32:17: error: invalid type argument of unary ‘*’ (have ‘int’)
double A=6*10*
^
sa.C:32:22: error: invalid use of incomplete type ‘struct g(double*, size_t, double*
double A=6*10*
sa.C:28:9: error: forward declaration of ‘struct g(double*, size_t, double*
struct my_f_params * fp = (struct my_f_params *)par;
^
sa.C:32:30: error: invalid type argument of unary ‘*’ (have ‘int’)
double A=6*10*
sa.C:32:37: error: invalid type argument of unary ‘*’ (have ‘int’)
double A=6*10*
sa.C:32:43: error: invalid use of incomplete type ‘struct g(double*, size_t, double*
double A=6*10*
sa.C:28:9: error: forward declaration of ‘struct g(double*, size_t, double*
struct my_f_params * fp = (struct my_f_params *)par;
a.C:32:54: error: invalid use of incomplete type ‘struct g(double*, size_t, double*
double A=6*10*
sa.C:28:9: error: forward declaration of ‘struct g(double*, size_t, double*
struct my_f_para
struct my_f_params * fp = (struct my_f_params *)par;
^
sa.C:32:60: error: invalid type argument of unary ‘*’ (have ‘int’)
double A=6*10*
I an mew to coding. So please help.
^
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu lhapdf Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: