[Torbecire]
I want to get the a.cpp to read from the a.h file. But it won't, i have done this class thing before and it worked on another program but won't work on this. Help me out.
// File a.h
#ifndef LINEAR
#define LINEAR
class linear
{
public:
linear();
linear(int);
// 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 MaxValue() const;
};
// File: a.cpp
#include "a.h"
#include <iostream>
#include <climits>
using namespace std;
int main()
{
linear::linear()
{
Count = 0;
MaxValue = INT_MAX;
}
linear::linear(int mval)
{
Count = 0;
MaxValue = mval;
}
// ALTITUDE
void linear::alt()
{
Count = 1000;
maxalt = mValue;
}
// FUEL IN TANK
void linear::tankf()
{
Count = 1700;
maxtankf = mValue;
}
// FUEL CONSUMPTION
void linear::fuelconsum()
{
Count = 10/secs;
mfuelconsum = mValue;
}
// LANDER THRUST
void linear::thrust()
{
Count = 5000;
mthrust = mValue;
}
// VERTICAL SPEED
void linear::vspeed()
{
Count = 0/(vdistance/secs);
(maxvd/secs) = mValue;
}
// FUEL FLOW RATE
void linear::frate()
{
if(frate > 0 && frate ==0)
{
Count =0;
}
else
Count(int);
maxval = mValue;
}
// LANDER MASS W/O FUEL
void linear::massl()
{
Count = 900;
maxmassl = 2600;
}
//
void linear::mValue()
{
Count = 0;
mValue = INT_MAX;
}
int linear::getCount()
{
return Count;
}
int linear::getMaxValue()
{
return MaxValue;
}
}