Mayank Barnawal
unread,Jan 26, 2012, 1:02:56 AM1/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ode-users
Hello ode-users,
I am new to ODE. I am having trouble with the 'dMass' data type. I am
using VC++. Here is my program:
#include <stdio.h>
#include <math.h>
#include <ode/ode.h>
#include <drawstuff/drawstuff.h>
static dWorldID world;
static dBodyID box;
int main()
{
world=dWorldCreate();
box=dBodyCreate(world);
dBodySetPosition(box,0.0,0.0,0.0);
dMass m;
dMassSetBoxTotal(&m,0.05,5,5,5);
dBodySetMass(box,&m);
dWorldDestroy(world);
return 0;
}
The above code shows run time error message: Stack around the variable
'm' is corrupted.
Can anyone explain why it is so?
Thanks,
Mayank