1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
//Function Prototypes
double Moment(double feq, double xeq);
int main()
{
int nrows(0);
double moment[nrows];
double force[nrows];
int i(0), j(0);
double x(0), y(0);
double L, xn, xn1, w, feq, xeq, m, totmom, totforce, R1, R2;
//User inputs values
feq = (xn1 - xn) * w;
xeq = xn + 1/2 * (xn1 - xn);
//Enter force value into array - Error here
feq >> force[i];
m = Moment(feq, xeq);
//Enter moment value into array - Error here
m >> moment[i];
i++;
nrows++;
}
double Moment(double feq, double xeq)
{
double m;
m = feq * xeq;
return m;
}
| |