Hi again,
I saw omnett++ tutorial yesterday, but there are some points that I did not understand, the first is where shoud I define the ned function, shoud I create a new source file (.cc) ??
the second is when I put this code in a new source file :
#include <cnedvalue.h>
#include<essai3.h>
double runiform(double rng) {
static int r = 0;
static double l = 0;
if(r%2 == 0) l = uniform(0,1);
r++;
return l;
}
static cNEDValue runiform(cComponent *context, cNEDValue argv[], int argc)
{
double rng = argc==2 ? (int)argv[1] : 0;
return cNEDValue(runiform(rng), argv[0].getUnit());
}
Define_NED_Function(runiform, "quantity runiform(int rng?)", "random/continuous", "Retains the value generated from a previous call to uniform()");
it generate a syntax error , I didn't know what to do , sorry but I have just one week with omnet++ so I'm beginner.