I use the code below to set the value of a float array
#include "math.h"
#include "string.h"
#include <stdio.h>
#include <stdlib.h>
class MathCore
{
public:
    MathCore();
    virtual ~MathCore( );                   
    bool dosomething ( );
};
and
#include "MathCore.h"
MathCore::MathCore()
{
}
MathCore::~ MathCore()
{
}
bool MathCore::doSomething ( )
{
   //-------------------------------------------------
   float *xArray;
   xArray=(float*)malloc(sizeof(float)*5);
    float v=0.1;
    xArray[0]=v;
    return 1;
}
it always reports EXC_BAD_ACCESS error at
xArray[0]=v;
your comment welcome
 
     
    