I am new to c++ so I am not sure what I am doing or what's wrong any help ? I am just trying to do a simple equation of motion question where I find the initial velocity of a ball that reaches a max height of 200 meters in 30 seconds. the error in the title is what I keep getting
#include <iostream>
#include <cmath>
struct Ball {
float yf;
float v;
};
using namespace std;
void velocity (Ball b)
{
cout<<"words"<<(b.v = (b.yf - 0.5*9.8*900)/30)<<endl;
return;
}
int main()
{
velocity(Ball b);
return 0 ;
}