In a piece of code I am passing two parameters both of same type b2Vec2 *
void bool isVelocityAllowToCar(b2Vec2 *newVelocity, b2Vec2 *preVelocity);
When I build my project it showing me following error.
two or more data types in declaration of 'isVelocityAllowToCar'
What am I doing wrong?
The problem is the return type you specify. void bool is not valid, it's two types void and bool. You just need to remove the void and it should work:
bool isVelocityAllowToCar(b2Vec2 *newVelocity,b2Vec2 *preVelocity);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With