having trouble displaying the decimals after reading the data.
As the title says.. here are some code snippets.
the header for the student obj
class StudentRecordData
{
protected:
   double Marks[MAX_COURSES];
   unsigned int Age;
   unsigned int ID;
   unsigned int CourseCount;
   char FirstName[LEN_FN];
   char LastName[LEN_FN];
   Course  Courses[MAX_COURSES];
};
student header:
class Student : public StudentRecordData {
public:
    double *getMarks();
    unsigned int getAge();
    unsigned int getID();
    unsigned int getCourseCount();
    char *getFirstName();
    char *getLastName();
    Course *getCourses();
    double getAverage();
    int operator < (Student &);
    int operator < (const char &);
};
Student implementation (inherited the above)
#include "Student.h"
#include <iostream>
#include <cstring>
using namespace std;
double *Student::getMarks() {
    return Marks;
}
unsigned int Student::getAge() {
    return Age;
}
unsigned int Student::getID() {
    return ID;
}
unsigned int Student::getCourseCount() {
    return CourseCount;
}
char *Student::getFirstName() {
    return FirstName;
}
char *Student::getLastName() {
    return LastName;
}
Course *Student::getCourses() {
    return Courses;
}
int Student::operator<(Student &s) {
    int ret = 0;
    int LNRet = strcmp(this->getLastName(), s.getLastName());
    int FNRet = strcmp(this->getFirstName(), s.getFirstName());
    if (LNRet < 0) {
        ret = 1;
    } else if (LNRet == 0) {
        if (FNRet < 0) {
            ret = 1;
        }
    }
    return ret;
}
int Student::operator<(const char &s) {
    cout << "in char *!" << endl;
    int ret = 0;
    return ret;
}
double Student::getAverage() {
    double total = 0.00;
    for (int i = 0; i < (getCourseCount()); i++) {
        total = total + getMarks()[i];
    }
    return total / getCourseCount();
}
the main
#include "Course.h"
#include "Student.h"
#include "Node.h"
#include "LinkedList.h"
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int main(void) {
    char input[] = "OOP344.dat";
    char output[] = "OUTPUT.txt";
    Student student;
    LinkedList list;
    Node *node;
    // read in file
    ifstream ifile(input, ios::binary);
    while (!ifile.eof()) {
        ifile.read(reinterpret_cast<char *>(&student), sizeof(Student));
        node = new Node(student);
        list.addNode(node);
    }
    ifile.close();
    list.sort();
    // write to file
    ofstream ofile(output);
    if (ofile.is_open()) {
        for (node = list.getFirstNode(); node; node = list.getNextNode(node)) {
            cout << setw(10) << "Last Name" << setw(12) << "First Name" << setw(5) << "Age" << setw(12) << "Student ID" <<
                    setw(15) << "Course"    << setw(7) << "Mark" << endl;
            cout << setw(10) << "=========" << setw(12) << "==========" << setw(5) << "===" << setw(12) << "==========" <<
                    setw(15) << "======"    << setw(7) << "=====" << endl;
            cout << setw(10) << node->getValue().getLastName()
                 << setw(12) << node->getValue().getFirstName()
                 << setw(5) << node->getValue().getAge()
                 << setw(12) << node->getValue().getID()
                 << setw(22) << node->getValue().getAverage()
                 << endl;
                    int sem, sem_prev;
                    for (int i = 0; i < node->getValue().getCourseCount(); i++) {
                        sem = (int)node->getValue().getCourses()[i].Semester;
                        sem_prev = (int)node->getValue().getCourses()[i-1].Semester;
                        if (!(sem == sem_prev)) {
                            cout << setw(45) << "Sem " << (int)node->getValue().getCourses()[i].Semester << ":"
                                 << setw(7) << node->getValue().getCourses()[i].Name
                                 << setw(7) << setprecision(4) << node->getValue().getMarks()[i] << endl;
                        } else {
                            cout << setw(54) << node->getValue().getCourses()[i].Name
                                 << setw(7) << setprecision(4) << node->getValue().getMarks()[i] << endl;
                        }
                    }
                     cout << endl;
        }
    }
    ofile.close();
    return (0);
}
output:
Last Name  First Name  Age  Student ID         Course   Mark
 =========  ==========  ===  ==========         ======  =====
   Sakedad        Roya   25      486503                 74.31
                                         Sem 1: APC100     69
                                                EAC150     92
                                                ICA002     76
                                                IOS110     87
                                                IPC144     99
                                         Sem 2: ULI101     62
                                                DBS201     66
                                                IBC233     94
                                                INT222     58
                                                OOP244     67
                                         Sem 3: DBS301     61
                                                INT322     89
                                                SYS366     52
                                                BAC344     80
                                                OOP344     63
                                         Sem 4: DCN455     74
the problem is in this line near the bottom. it won't display any decimal points. any help is greatly appreciated.
  setprecision(4) << node->getValue().getMarks()[i] 
i can supply any other files which may be helpful. i'm just hoping my mistakes are somewhere in the main.
 
    