The a.cpp file will not read from a.h, could someone please tell me why? I asked earlier but did not get much help due to bad posting. My apologies to all you who i have burdened with my rookieness(not a word). Hopefully i did it right this time.
// File a.h
#ifndef LINEAR
#define LINEAR
class linear
{
public:
linear();
linear(int);
// SET MAX VALUE
void setmv();
// FUEL CONSUMPTION
void fuelconsum();
// void fuelconsum(int);
// FUEL FLOW RATE
void frate();
// void frate(int);
// LANDER MASS
//void massl();
void massl(int);
// LANDER THRUST
//void thrust();
void thrust(int);
// ADD FUEL, ALTITUDE
//void increment(int);
// REDUCE FUEL, ALTITUDE
// void decrement(int);
// ALTITUDE
//void alt();
void alt (int);
// FUEL IN TANK
void tankf();
//void tankf(int);
// VERTICAL SPEED
void vspeed();
//void vspeed(int);
int getCount() const;
int getMaxValue() const;
private:
int count() const;
int mv() const;
};
// File: a.cpp
#include "a.h"
#include <iostream>
#include <climits>
using namespace std;
linear::linear()
{
count = 0;
mv = INT_MAX;
}
linear::linear(int mval)
{
count = 0;
mv = mval;
}
// ALTITUDE
void linear::alt()
{
Count = 1000;
mv = INT_MAX;
}
// FUEL IN TANK
void linear::tankf()
{
Count = 1700;
mv = INT_MAX;
}
// FUEL CONSUMPTION
void linear::fuelconsum()
{
Count = 10/secs;
mv = INT_MAX;
}
// LANDER THRUST
void linear::thrust()
{
Count = 5000;
mv = INT_MAX;
}
// VERTICAL SPEED
void linear::vspeed()
{
Count = 0/(vdistance/secs);
mv = INT_MAX;
}
// FUEL FLOW RATE
void linear::frate()
{
if(frate > 0 && frate ==0)
{
Count =0;
}
else
Count(int);
mv = INT_MAX;
}
// LANDER MASS W/O FUEL
void linear::massl()
{
Count = 900;
mv = 2600;
}
int linear::getCount()
{
return count;
}
int linear::getMaxValue()
{
return mv;
}