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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#include <iostream>
#include <iomanip>
#include <vector>
#include <fstream>
#include <ctime>
using namespace std;
struct Axle {
int aRef;
float aWeight;
float aPos;
bool aFlag;
};
// Prototypes
void getVehicleDetails (vector<Axle>&vehicle, float &Span, float &inc, int &noAxles);
void createOutput (float &Span, float &inc);
void arrayDump(vector<Axle>&vehicle, int &noAxles);
void analyse(vector<Axle>&vehicle, int &noAxles);
// Main Prog
int main(){
int noAxles = 0;
float Span = 0, inc =0;
vector<Axle> vehicle;
getVehicleDetails(vehicle, Span, inc, noAxles);
createOutput(Span, inc);
arrayDump(vehicle, noAxles);
analyse(vehicle, noAxles);
return 0;
}
void getVehicleDetails(vector<Axle>&vehicle, float &Span, float &inc, int &noAxles){
// Get user input to populate variables
}
void createOutput(float &Span, float &inc){
// Creates an output file outing some variables
}
void arrayDump(vector<Axle>&vehicle, int &noAxles){
// dump of variables after each iteration
}
void analyse(vector<Axle>&vehicle, int &noAxles){
// Analysis - performs calcs after each iteration and calls the arrayDump each time
}
|