Today I opened my program to double check if there was any bugs in my code and unfortunately it appears that the bug its my function prototype by the message of the compiler. For some weird reason this program was perfectly working with no bugs with the same codes and with no changes whatsoever in the code and then next day it gives me something different.
here is the code dealing with function to compute static formula.
#include <cmath>
#include <iostream>
using namespace std;
int main() {
double weight, length, elasticity, base, height, result;
cout<<"Chapter 6, Exercise 3: Calculating the maximum deflection using fucntions. "<<endl;
cout<<"\nEnter the Weight(lb): ";
cin>>weight;
cout<<"Enter the Lenght(ft):";
cin>>length;
cout<<"Enter the Modulus of Elasticity of the Beam (lb/ft2): "; // the instructions does not mention for the input but unfortunately the formula requires the input.
cin>>elasticity;
cout<<"Enter the Base(ft):";
cin>>base;
cout<<"Enter the Height (ft):";
cin>>height;
maxDeflect(weight, length, elasticity, base, height, result);// call for the function
cout<<"The maximum deflection is "<<result<<" In."<<endl;
return 0;
}