Hey all. I have worked on this in a previous post, but because of the huge difference in work needed, i have reposted it here.

First off, i created a project that would input data from keyboard of a student, this student had name,ssn,dob,school id information that was needed. After inputting this data, you could add classes for this singly student... into an array of objects that included (course name, course semester, course year, and course grade). having done this with a basic array, i had set the array to be size 10 (very limiting if student has, say 11 classes!). Sooo..

For our second project we have to do a linked list of the course objects. Therefore, we can add classes to a single student for as long as we have the memory to store it all!

Here is an error i am getting in my class definition for the student (declaring a linked list):

1>driver.cpp
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C2143: syntax error : missing ';' before '<'
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C2238: unexpected token(s) preceding ';'
1>Student.cpp
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C2143: syntax error : missing ';' before '<'
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\tony\documents\visual studio 2008\projects\project2\student.h(27) : error C2238: unexpected token(s) preceding ';'

This is using Visual Studio Pro 2008.

I will post all needed .h and .cpp files that are in the project. I had split them up for ease of read purposes, and per class requirements.

Please could someone explain what this error means? Am i declaring it incorrectly? Have i made a mistake elsewhere?

I have more questions to follow - but first off it would be good to get my linked list defined correctly first!

Thanks all

PS - the SinglyLinkedList.h file is the newest 'addition' to my project - i had this all working flawlessly previously (besides im sure my quirky programming!!!!)

Attachments
#ifndef H_340
#define H_340

#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>

#include <cstdlib>
#include <climits>
#include <cmath>
#include <ctime>

#include <algorithm>
#include <functional>
#include <iterator>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>

#include <stdexcept>
using namespace std;
#endif
#include "courseInfo.h"

/****************************************************************
   FUNCTION:   courseInfo()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the constructor for the CourseInfo class
****************************************************************/
CourseInfo::CourseInfo()
{
   count = 0;
}

/****************************************************************
   FUNCTION:   ~CourseInfo()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the destructor for the CourseInfo class
****************************************************************/
CourseInfo::~CourseInfo()
{
}

/****************************************************************
   FUNCTION:   getCourseID() const
   ARGUMENTS:  none
   RETURNS:    string courseID
   NOTES:      this function returns the courseID for the student
****************************************************************/
string CourseInfo::getCourseID() const
{
	return courseID;
}

/****************************************************************
   FUNCTION:   setCourseID(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this function sets the courseID for the student
****************************************************************/
void CourseInfo::setCourseID(string &x)
{
	courseID = x;
}

/****************************************************************
   FUNCTION:   setYearTaken(const string &x)
   ARGUMENTS:  const string &x - the new YearTaken
   RETURNS:    none
   NOTES:      this function sets the students YearTaken for a course
****************************************************************/
void CourseInfo::setYearTaken(string &x)
{
	yearTaken = x;
}

/****************************************************************
   FUNCTION:   getYearTaken() const
   ARGUMENTS:  none
   RETURNS:    string yearTaken
   NOTES:      this returns the students YearTaken for a certain class
****************************************************************/
string CourseInfo::getYearTaken() const
{
	return yearTaken;
}

/****************************************************************
   FUNCTION:   setSemesterTaken(const string &x)
   ARGUMENTS:  const string &x - the semesterTaken value
   RETURNS:    none
   NOTES:      this function sets the students semester taken for
               a specific course
****************************************************************/
void CourseInfo::setSemesterTaken(string &x)
{
	semesterTaken = x;
}

/****************************************************************
   FUNCTION:   getSemesterTaken() const
   ARGUMENTS:  none
   RETURNS:    string semesterTaken - returns the semester taken
   NOTES:      this function gets the students semester taken
****************************************************************/
string CourseInfo::getSemesterTaken() const
{
	return semesterTaken;
}

/****************************************************************
   FUNCTION:   setGrade(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this functions sets the grade for a certain class
****************************************************************/     
void CourseInfo::setGrade(string &x)
{
	grade = x;
}
      
/****************************************************************
   FUNCTION:   getGrade() const
   ARGUMENTS:  none
   RETURNS:    string grade
   NOTES:      this function returns the grade of the student in 
                a specific class
****************************************************************/
string CourseInfo::getGrade() const
{
	return grade;
}

/****************************************************************
   FUNCTION:   incrementCount(int &x)
   ARGUMENTS:  int x - the value of count
   RETURNS:    none
   NOTES:      this function increments the number of courses input
****************************************************************/
void CourseInfo::incrementCount(int &x)
{
	x = x + 1;
}

/****************************************************************
   FUNCTION:   getCoount() const
   ARGUMENTS:  none
   RETURNS:    int count
   NOTES:      this function returns the count of classes
****************************************************************/
int CourseInfo::getCount() const
{
	return count;
}
/****************************************************************
   FILE:      courseInfo.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class courseInfo information / prototypes 
****************************************************************/
#ifndef COURSEINFO_H
#define COURSEINFO_H

#include "340.h"

class CourseInfo {
	public:
      CourseInfo();
      virtual ~CourseInfo();
      void setCourseID(string &x);
      string getCourseID() const;
      void setYearTaken(string &x);
      string getYearTaken() const;
      void setSemesterTaken(string &x);
      string getSemesterTaken() const;
      void setGrade(string &x);
      string getGrade() const;
      void incrementCount(int &x);
      int getCount() const;
      
    private:
      string courseID;
      string yearTaken;
      string semesterTaken;
      string grade;
      int count;
      
};


#endif //COURSEINFO_H
/****************************************************************
   PROGRAM:   Project 1
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/26/2009

   FUNCTION:  creates a program that enables a user to input
   		    student data. Including name, zid, SSN, and courses.

   INPUT:     from keyboard

   OUTPUT:    A list of all courses taken/schedules for a certain
   			  student.

   NOTES:     Uses 6 files. Student.h, Student.cpp, Person.h, Person.cpp,
   			  courseInfo.h, courseInfo.cpp, and 340.h.
****************************************************************/
#include "Person.h"
#include "Student.h"
#include "courseInfo.h"
#include "340.h"

int main()
{
   int choice = 0;       
	    
   Student NIU_Student; //creates a student object
   while (choice != 999)
   {
         cout << "\nStudent Registration Database" << endl;
         cout << "Please choose from the options below (type 999 to quit)\n" << endl;
		 cout << "0. Select this to read in from file" << endl;
         cout << "1. Enter new student information" << endl;
         cout << "2. Enter new class information for student" << endl;
         cout << "3. Edit student information (not valid)" << endl;
         cout << "4. Edit class information for student (not valid)" << endl;
         cout << "5. Print student information\n" << endl;
         cout << "Please enter your choice: (the press enter, 999 to quit)";
         cin >> choice;
         
   switch(choice)
   {
   case 0:
	{
		ifstream inFile;
		string fileName;
		cout << "Please enter name of file to read in: " << endl;
		cin >> fileName;

		inFile.open("fileName"); //opens file
		if (!inFile)
		{
			cout << "\nThe input file does not exist!" << endl;
			return 1;
		}
		
		string value;
		inFile >> value;
		NIU_Student.setFirstName(value);
		inFile >> value;
		NIU_Student.setLastName(value);
		inFile >> value;
		NIU_Student.setSSN(value);
		inFile >> value;
		NIU_Student.setDOB(value);
		inFile >> value;
		NIU_Student.setGender(value);
		inFile >> value;
		NIU_Student.setZID(value);
		while (inFile)
		{
			//read in class info (courseName, courseYear, courseSemester, courseGrade)
			// be able to read in as many as needed - and add them to the linked list set up in Student.h
		}

		break;
	}

   case 1:
       {
	       string x;
	       cout << "Please enter the first name: ";
	       cin >> x;
	       NIU_Student.setFirstName(x);
	       cout << "Please enter the last name: ";
	       cin >> x;
	       NIU_Student.setLastName(x);
	       cout << "Please enter students social security number: ";
	       cin >> x;
	       NIU_Student.setSSN(x);
	       cout << "Please enter student DoB: ";
	       cin >> x;
	       NIU_Student.setDOB(x);
	       cout << "Please enter the student's gender: ";
	       cin >> x; 
           NIU_Student.setGender(x);
           cout << "Please enter students ZID: ";
           cin >> x;
           NIU_Student.setZID(x);
           break;
         }
    case 2:
         { 
           //string entry, 
            //      more;
           /*
		   do
           {        
             cout << "Please enter course name: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setCourseID(entry);
             cout << "Please enter year taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setYearTaken(entry);
             cout << "Please enter semester taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setSemesterTaken(entry);
             cout << "Please enter grade for course: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setGrade(entry);
            cout << "Enter another class? (Y/N): ";
            cin >> more;
            NIU_Student.incrementCount();
           } while (more == "Y" || more == "y");
		   */
           break;
         }
    case 3:
         {
           cout << "Choice entered was 3" << endl;
           break;
         }
    case 4:
         {
           cout << "Choice entered was 4" << endl;
           break;
         }
    case 5:
         {
		   NIU_Student.infoPrint();
         break;
         }  
    case 999:
         {
           cout << "Quitting..." << endl;
           break;
         }
    } // end of switch statement
    } // end of while
    
    return 0;
}
#include "Person.h"

/****************************************************************
   FUNCTION:   Person()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Person() constructor
****************************************************************/
Person::Person()
{
}

/****************************************************************
   FUNCTION:   ~Person()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Person destructor
****************************************************************/      
Person::~Person()
{
}

/****************************************************************
   FUNCTION:   setFirstName(const string &x)
   ARGUMENTS:  const string &x - the first name of student
   RETURNS:    none
   NOTES:      this function sets the students first name
****************************************************************/
void Person::setFirstName(string &x)
{
     firstName = x;
}

/****************************************************************
   FUNCTION:   getFirstname() const
   ARGUMENTS:  none
   RETURNS:    string firstName
   NOTES:      this function returns the students first name
****************************************************************/
string Person::getFirstName() const 
{
     return firstName;
}

/****************************************************************
   FUNCTION:   setLastName(const string &x)
   ARGUMENTS:  const string &x - the students last name
   RETURNS:    none
   NOTES:      this function sets the students last name
****************************************************************/
void Person::setLastName(string &x) 
{
     lastName = x;
}

/****************************************************************
   FUNCTION:   getLastName() const
   ARGUMENTS:  none
   RETURNS:    string lastName
   NOTES:      this function returns the students last name
****************************************************************/
string Person::getLastName() const 
{
     return lastName;
}

/****************************************************************
   FUNCTION:   setSSN(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this function sets the students SSN
****************************************************************/
void Person::setSSN(string &x) 
{
     SSN = x;
}

/****************************************************************
   FUNCTION:   getSSN() const
   ARGUMENTS:  none
   RETURNS:    string SSN
   NOTES:      this function returns the students SSN
****************************************************************/
string Person::getSSN() const 
{
       return SSN;
}

/****************************************************************
   FUNCTION:   setDOB(const string &x)
   ARGUMENTS:  const string &x - the students DOB
   RETURNS:    none
   NOTES:      this function sets the students DOB
****************************************************************/
void Person::setDOB(string &x) 
{
     DOB = x;
}

/****************************************************************
   FUNCTION:   getDOB() const
   ARGUMENTS:  none
   RETURNS:    string DOB
   NOTES:      this function returns the students DOB
****************************************************************/
string Person::getDOB() const 
{
       return DOB;
}

/****************************************************************
   FUNCTION:   setGender(const string &x)
   ARGUMENTS:  const string &x - the students gender
   RETURNS:    none
   NOTES:      this function sets the student gender
****************************************************************/
void Person::setGender(string &x) 
{
     gender = x;
}

/****************************************************************
   FUNCTION:   getGender() const
   ARGUMENTS:  none
   RETURNS:    string gender 
   NOTES:      this function returns the students gender
****************************************************************/
string Person::getGender() const 
{
       return gender;
}
/****************************************************************
   FILE:      Person.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class Person information / prototypes 
****************************************************************/
#ifndef PERSON_H
#define PERSON_H

#include "340.h"

class Person {
	public:
      Person();
      virtual ~Person();
     // void infoPrint(); 
      void setFirstName(string &x);
      string getFirstName() const;
      void setLastName(string &x);
      string getLastName() const;
      void setSSN(string &x);
      string getSSN() const;
      void setDOB(string &x);
      string getDOB() const;
      void setGender(string &x);
      string getGender() const;
      
    private:
      string firstName;
      string lastName;
      string SSN;
      string DOB;
      string gender;
};

#endif //PERSON_H
/****************************************************************
   FILE:      SinglyLinkedList.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class SinglyLinkedList information / prototypes 
****************************************************************/
#ifndef SINGLYLINKEDLIST_H
#define SINGLYLINKEDLIST_H

#include "340.h"



#endif //SINGLYLINKEDLIST
#include "Student.h"


/****************************************************************
   FUNCTION:   Student()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Student class constructor
****************************************************************/
Student::Student()
{
	count = 0;
}

/****************************************************************
   FUNCTION:   ~Student()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the destructor for the Student class
****************************************************************/   
Student::~Student()
{
}

/****************************************************************
   FUNCTION:   incrementCount()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      This function increments count so that the number
               of classes added are counted on entry
****************************************************************/
void Student::incrementCount()
{
	count = count + 1;
}

/****************************************************************
   FUNCTION:   getZID()
   ARGUMENTS:  none
   RETURNS:    ZID - returns the students ZID number
   NOTES:      This function simply returns the students ZID#
****************************************************************/
string Student::getZID() const
{
     return ZID;
}

/****************************************************************
   FUNCTION:   setZID(const string &x)
   ARGUMENTS:  string x
   RETURNS:    none
   NOTES:      this function sets the students ZID with the value
               passed to it.
****************************************************************/
void Student::setZID(string &x)
{
     ZID = x;
}

/****************************************************************
   FUNCTION:   getCount() const
   ARGUMENTS:  none
   RETURNS:    int count
   NOTES:      this function returns the count of the number of 
               classes added to the students registration etc
****************************************************************/
int Student::getCount() const
{
	return count;
}

/****************************************************************
   FUNCTION:   infoPrint()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this prints the students information, including the
               basic information, aswell as class information
****************************************************************/
void Student::infoPrint()
{	/*
  cout << Person::getFirstName()<< " " << Person::getLastName()
       << " " << Person::getSSN() << " " << Person::getDOB()
       << " " << Person::getGender()<< " " << getZID()
       << endl;      
     
	int count = 0;          
	while (count <= getCount())
           {
             cout << setw(8) << courses[count].getCourseID() << " " 
                << setw(5) << courses[count].getYearTaken() << " " 
                << setw(7) << courses[count].getSemesterTaken() << " " 
                << setw(3) << courses[count].getGrade() << endl;
             count++;
           }
*/
		   }

That would help huh? Sorry! My apologies!

Should be 'working' now in terms of needed files to attempt a compile!

Attachments
/****************************************************************
   FILE:      Student.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class Student information / prototypes 
****************************************************************/
#ifndef STUDENT_H
#define STUDENT_H

#include "Person.h"
#include "courseInfo.h"
#include "SinglyLinkedList.h"
#include "340.h"


class Student : public Person {
	public:
      Student();
      virtual ~Student(); 
      string getZID() const;
      void setZID(string &x);    
      void incrementCount();
      int getCount() const;
      void infoPrint(); 
      SinglyLinkedList<CourseInfo> courses;
    
	private:
      string ZID;
      int count;
    
};

#endif //STUDENT_H

The error is on line 27 in students.h

SinglyLinkedList<CourseInfo> courses;

It doesn't know what a SinglyLinkedList is because you haven't defined it yet in your SinglyLinkedList.h

If you add

template<typename T>
class SinglyLinkedList
{


};

to your SinglyLinkedList.h it should compile fine!

I thought i did have it: (SinglyLinkedList.h)

template <class ItemType>
class SinglyLinkedList
{
	public:
		SinglyLinkedList() { head = tail = 0;}
		~SinglyLinkedList();
		int isEmpty() {return head == 0} // checks to see if list is empty
		void addToHead(ItemType);
		void delteNode(ItemType);
		bool isInList(ItemType) const;

	private:
		int count; // variable stores # of elements in list
		nodeSLL<ItemType> *head; //pointer to first node in list
		nodeSLL<ItemType> *tail; //pointer to last node in list
};

*** There is more to the .h - than what is listed here, but this is the class definition that you thought i was missing correct???***
This is correct right?

Am i missing something else --- i thought i had that and it was set up correctly!?!

Thanks for the help so far! Please keep helping if possible!

The above post is a big mistake. I was referencing the incorrect singlylinkedlist.h file when trying to compile. the file i was using at the time had no class definition...obvious mistake there! i will upload the new / updated singlylinkedlist.h file here.

new errors, only a couple of them i am getting now:

error C2955: 'nodeSLL' : use of class template requires template argument list
see declaration of 'nodeSLL'
hile compiling class template member function 'SinglyLinkedList<ItemType>::~SinglyLinkedList(void)'
1> with
1> [
1> ItemType=CourseInfo
1> ]
hile compiling class template member function 'SinglyLinkedList<ItemType>::~SinglyLinkedList(void)'

Attached is full error log:

thanks in advance

Attachments
/****************************************************************
   FILE:      SinglyLinkedList.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class SinglyLinkedList information / prototypes 
****************************************************************/
#ifndef SINGLYLINKEDLIST_H
#define SINGLYLINKEDLIST_H

#include "340.h"

template <class ItemType>
class nodeSLL
{
	public:
		nodeSLL() {next = 0;} // default constructor
		nodeSLL(int ItemType, nodeSLL *in = 0) {info = i, next = in;} // if called with variable
		~nodeSLL() {}
		ItemType info;
		nodeSLL<ItemType> *next;
};

template <class ItemType>
class SinglyLinkedList
{
	public:
		SinglyLinkedList() { head = tail = 0;}
		~SinglyLinkedList();
		int isEmpty() {return head == 0} // checks to see if list is empty
		void addToHead(ItemType);
		void deleteNode(ItemType);
		bool isInList(ItemType) const;

	private:
		int count; // variable stores # of elements in list
		nodeSLL<ItemType> *head; //pointer to first node in list
		nodeSLL<ItemType> *tail; //pointer to last node in list
};

template <class ItemType>
SinglyLinkedList<ItemType>::~SinglyLinkedList() 
{
	for (nodeSLL *p; !isEmpty(); )
	{
		p = head->next;
		delete head;
		head = p;
	}
}

template <class ItemType>
void SinglyLinkedList<ItemType>::addToHead(ItemType value)
{
	head = new nodeSLL(value, head);
	if (tail == 0)
		tail = head;
}

template <class ItemType>
void SinglyLinkedList<ItemType>::deleteNode(ItemType value)
{
	if (head != 0)
		//check to see if only one value in list
		if (head == tail && value == head->info)
		{
			delete head;
			head = tail = 0;
		}
		else if (value == head->info)
		{
			nodeSSL *tmp = head;
			head = head->next;
			delete tmp;
		}
		else
		{
			nodeSLL *pred, *tmp;
			for (pred = head, tmp = head->next; 
				tmp != 0 && !(tmp->info == value); 
				pred = pred->next, tmp = tmp->next);
			if (tmp != 0)
			{
				pred->next = tmp->next;
				if (tmp == tail)
					tail = pred;
				delete tmp;
			}
		}
}

template <class ItemType>
bool SinglyLinkedList<ItemType>::isInList(ItemType value) const
{
	nodeSLL *tmp;
	for (tmp = head; tmp != 0 && !(tmp->info == value); tmp = tmp->next)
		return tmp != 0;
}
#endif //SINGLYLINKEDLIST

The errors are coming from the for loop in this

template <class ItemType>
SinglyLinkedList<ItemType>::~SinglyLinkedList() 
{

	for (nodeSLL *p; !isEmpty(); )
	{
		p = head->next;
		delete head;
		head = p;
	}
}

so you might want to check out some information on for loops.
Also, nodeSLL* p should be nodeSLL<ItemType>* p

An easier way of doing the destructor is to use a while loop instead of a for loop

template <class ItemType>
SinglyLinkedList<ItemType>::~SinglyLinkedList() 
{
	while(head != 0)
	{
		nodeSLL<ItemType>* p = head->next;			
		delete head;
		head = p;
	}
}

Hey guys - thanks a ton for all the help so far. Im getting there, at least so i think.

My next question concerns my input. I have to read in from a file and create the student object, and set the students class list all from a given text file. I have done this (at least the namessn,dob,gender, etc) in the cxase 0 of my driver.cpp file.

input file:

John Smith 333222333 01/01/80 M z11119
CS240 Fall 2009 A
CS333 Spring 2009 B
HIST450 Fall 2009 C

My problem is that i unsure how to read my class list - i think a while loop like this would work:

while (inFile)
		{
			//read in class info (courseName, courseYear, courseSemester, courseGrade)
			// be able to read in as many as needed - and add them to the linked list set up in Student.h
		}

But how would i this work? I would have to create a new node at the start of the loop, and then i would send a function each value... but would i still be using my setSemester etc methods? Because i will now be using my linked list...

So for example, i should have:

Start:
LinkedList ->
Node1--
Name = cs240
Semester = Spring
Year = 2009
Grade = A
Next -> Node2
Name = cs340
Semester = Fall
Year = 2008
Grade = C
Next -> Node 3....

etc ... is this my correct logic in thinking this would be possible the way i have set up my linked list?

If so, is it as simple as using my set methods?

Thanks for help and the ideas to you all

Attachments
#include "Person.h"
#include "Student.h"
#include "courseInfo.h"
#include "340.h"

int main()
{
   int choice = 0;       
	    
   Student NIU_Student; //creates a student object
   while (choice != 999)
   {
         cout << "\nStudent Registration Database" << endl;
         cout << "Please choose from the options below (type 999 to quit)\n" << endl;
		 cout << "0. Select this to read in from file" << endl;
         cout << "1. Enter new student information" << endl;
         cout << "2. Enter new class information for student" << endl;
         cout << "3. Edit student information (not valid)" << endl;
         cout << "4. Edit class information for student (not valid)" << endl;
         cout << "5. Print student information\n" << endl;
         cout << "Please enter your choice: (the press enter, 999 to quit)";
         cin >> choice;
         
   switch(choice)
   {
   case 0:
	{
		ifstream inFile;

		inFile.open("C:\\Users\\Tony\\Documents\\Visual Studio 2008\\Projects\\project2\\file.txt"); //opens file
		if (!inFile)
		{
			cout << "\nThe input file does not exist!" << endl;
			return 1;
		}
		
		string value;
		inFile >> value;
		cout << value;
		//NIU_Student.setFirstName(value);
		inFile >> value;
		cout << value;
				inFile >> value;
		cout << value;
				inFile >> value;
		cout << value;
				inFile >> value;
		cout << value;
				inFile >> value;
		cout << value;
		/*
		NIU_Student.setLastName(value);
		inFile >> value;
		NIU_Student.setSSN(value);
		inFile >> value;
		NIU_Student.setDOB(value);
		inFile >> value;
		NIU_Student.setGender(value);
		inFile >> value;
		NIU_Student.setZID(value);
		
		while (inFile)
		{
			//read in class info (courseName, courseYear, courseSemester, courseGrade)
			// be able to read in as many as needed - and add them to the linked list set up in Student.h
		}
		*/
		break;
	}

   case 1:
       {
	       string x;
	       cout << "Please enter the first name: ";
	       cin >> x;
	       NIU_Student.setFirstName(x);
	       cout << "Please enter the last name: ";
	       cin >> x;
	       NIU_Student.setLastName(x);
	       cout << "Please enter students social security number: ";
	       cin >> x;
	       NIU_Student.setSSN(x);
	       cout << "Please enter student DoB: ";
	       cin >> x;
	       NIU_Student.setDOB(x);
	       cout << "Please enter the student's gender: ";
	       cin >> x; 
           NIU_Student.setGender(x);
           cout << "Please enter students ZID: ";
           cin >> x;
           NIU_Student.setZID(x);
           break;
         }
    case 2:
         { 
           //string entry, 
            //      more;
           /*
		   do
           {        
             cout << "Please enter course name: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setCourseID(entry);
             cout << "Please enter year taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setYearTaken(entry);
             cout << "Please enter semester taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setSemesterTaken(entry);
             cout << "Please enter grade for course: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setGrade(entry);
            cout << "Enter another class? (Y/N): ";
            cin >> more;
            NIU_Student.incrementCount();
           } while (more == "Y" || more == "y");
		   */
           break;
         }
    case 3:
         {
           cout << "Choice entered was 3" << endl;
           break;
         }
    case 4:
         {
           cout << "Choice entered was 4" << endl;
           break;
         }
    case 5:
         {
		   NIU_Student.infoPrint();
         break;
         }  
    case 999:
         {
           cout << "Quitting..." << endl;
           break;
         }
    } // end of switch statement
    } // end of while
    
    return 0;
}
/****************************************************************
   FILE:      SinglyLinkedList.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class SinglyLinkedList information / prototypes 
****************************************************************/
#ifndef SINGLYLINKEDLIST_H
#define SINGLYLINKEDLIST_H

#include "340.h"

template <class ItemType>
class nodeSLL
{
	public:
		nodeSLL() {next = 0;} // default constructor
		nodeSLL(int ItemType, nodeSLL *in = 0) {info = i, next = in;} // if called with variable
		~nodeSLL() {}
		ItemType info;
		nodeSLL<ItemType> *next;
};

template <class ItemType>
class SinglyLinkedList
{
	public:
		SinglyLinkedList() { head = tail = 0;}
		~SinglyLinkedList();
		int isEmpty() {return head == 0} // checks to see if list is empty
		void addToHead(ItemType);
		void deleteNode(ItemType);
		bool isInList(ItemType) const;

	private:
		int count; // variable stores # of elements in list
		nodeSLL<ItemType> *head; //pointer to first node in list
		nodeSLL<ItemType> *tail; //pointer to last node in list
};

template <class ItemType>
SinglyLinkedList<ItemType>::~SinglyLinkedList() 
{
    while(head != 0)
    {
        nodeSLL<ItemType>* p = head->next;            
        delete head;
        head = p;
    }
}


template <class ItemType>
void SinglyLinkedList<ItemType>::addToHead(ItemType value)
{
	head = new nodeSLL(value, head);
	if (tail == 0)
		tail = head;
}

template <class ItemType>
void SinglyLinkedList<ItemType>::deleteNode(ItemType value)
{
	if (head != 0)
		//check to see if only one value in list
		if (head == tail && value == head->info)
		{
			delete head;
			head = tail = 0;
		}
		else if (value == head->info)
		{
			nodeSSL *tmp = head;
			head = head->next;
			delete tmp;
		}
		else
		{
			nodeSLL *pred, *tmp;
			for (pred = head, tmp = head->next; 
				tmp != 0 && !(tmp->info == value); 
				pred = pred->next, tmp = tmp->next);
			if (tmp != 0)
			{
				pred->next = tmp->next;
				if (tmp == tail)
					tail = pred;
				delete tmp;
			}
		}
}

template <class ItemType>
bool SinglyLinkedList<ItemType>::isInList(ItemType value) const
{
	nodeSLL *tmp;
	for (tmp = head; tmp != 0 && !(tmp->info == value); tmp = tmp->next)
		return tmp != 0;
}
#endif //SINGLYLINKEDLIST

Alright guys - i have figured out my last question, and as always have come across a myriad of other things i am unsure of. First off, i am getting a couple of errors i am unsure to their meaning:

(this is a warning, not an error, but need to get it rid of anyway):
Student.h:14, from driver.cpp In file included from Student.h:14, from driver.cpp
\SinglyLinkedList.h [Warning] no newline at end of file

And here are my other errors ... i hope someone can understand what i am TRYING to do, and what my variable and stuff are:

47: SinglyLinkedList.h there are no arguments to `addToHead' that depend on a template parameter, so a declaration of `addToHead' must be available
47 SinglyLinkedList.h (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
SinglyLinkedList.h In member function `nodeSLL<ItemType>* SinglyLinkedList<ItemType>::r_deleteNode(const ItemType&, nodeSLL<ItemType>*)':
83 SinglyLinkedList.h expected primary-expression before '*' token
83 SinglyLinkedList.h `next' undeclared (first use this function)

At the present time, i have worked on the following:

In driver.cpp:
I have worked on getting a case 0 so that i can read in from a text file (i will post this file with all data in it here). I have been able to read in and print the correct student name, ssn, etc. But i was hoping i could get input as to the way i did the classID, semester, grade, year, etc.
Case 0:
- i hope that you can see what i am doing by calling the addCourse() function, which i want to send a CourseInfo object to, this function will then call, addToHead() passing it the object, which will add the CourseInfo object to the head of my linked list. Is this possible do you think in what i have tried?

I appreciate all the help you can give me, and i hope you understand what i am trying to do!

- Please know you will have to change the location of my .txt file in the driver.cpp to your needs - as it curently lists my directory information.

Attachments
#ifndef H_340
#define H_340

#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>

#include <cstdlib>
#include <climits>
#include <cmath>
#include <ctime>

#include <algorithm>
#include <functional>
#include <iterator>
#include <string>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>

#include <stdexcept>
using namespace std;
#endif
#include "courseInfo.h"

/****************************************************************
   FUNCTION:   courseInfo()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the constructor for the CourseInfo class
****************************************************************/
CourseInfo::CourseInfo()
{
   count = 0;
}

/****************************************************************
   FUNCTION:   ~CourseInfo()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the destructor for the CourseInfo class
****************************************************************/
CourseInfo::~CourseInfo()
{
}

/****************************************************************
   FUNCTION:   getCourseID() const
   ARGUMENTS:  none
   RETURNS:    string courseID
   NOTES:      this function returns the courseID for the student
****************************************************************/
string CourseInfo::getCourseID() const
{
	return courseID;
}

/****************************************************************
   FUNCTION:   setCourseID(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this function sets the courseID for the student
****************************************************************/
void CourseInfo::setCourseID(string &x)
{
	courseID = x;
}

/****************************************************************
   FUNCTION:   setYearTaken(const string &x)
   ARGUMENTS:  const string &x - the new YearTaken
   RETURNS:    none
   NOTES:      this function sets the students YearTaken for a course
****************************************************************/
void CourseInfo::setYearTaken(string &x)
{
	yearTaken = x;
}

/****************************************************************
   FUNCTION:   getYearTaken() const
   ARGUMENTS:  none
   RETURNS:    string yearTaken
   NOTES:      this returns the students YearTaken for a certain class
****************************************************************/
string CourseInfo::getYearTaken() const
{
	return yearTaken;
}

/****************************************************************
   FUNCTION:   setSemesterTaken(const string &x)
   ARGUMENTS:  const string &x - the semesterTaken value
   RETURNS:    none
   NOTES:      this function sets the students semester taken for
               a specific course
****************************************************************/
void CourseInfo::setSemesterTaken(string &x)
{
	semesterTaken = x;
}

/****************************************************************
   FUNCTION:   getSemesterTaken() const
   ARGUMENTS:  none
   RETURNS:    string semesterTaken - returns the semester taken
   NOTES:      this function gets the students semester taken
****************************************************************/
string CourseInfo::getSemesterTaken() const
{
	return semesterTaken;
}

/****************************************************************
   FUNCTION:   setGrade(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this functions sets the grade for a certain class
****************************************************************/     
void CourseInfo::setGrade(string &x)
{
	grade = x;
}
      
/****************************************************************
   FUNCTION:   getGrade() const
   ARGUMENTS:  none
   RETURNS:    string grade
   NOTES:      this function returns the grade of the student in 
                a specific class
****************************************************************/
string CourseInfo::getGrade() const
{
	return grade;
}

/****************************************************************
   FUNCTION:   incrementCount(int &x)
   ARGUMENTS:  int x - the value of count
   RETURNS:    none
   NOTES:      this function increments the number of courses input
****************************************************************/
void CourseInfo::incrementCount(int &x)
{
	x = x + 1;
}

/****************************************************************
   FUNCTION:   getCoount() const
   ARGUMENTS:  none
   RETURNS:    int count
   NOTES:      this function returns the count of classes
****************************************************************/
int CourseInfo::getCount() const
{
	return count;
}
/****************************************************************
   FILE:      courseInfo.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class courseInfo information / prototypes 
****************************************************************/
#ifndef COURSEINFO_H
#define COURSEINFO_H

#include "340.h"

class CourseInfo {
	public:
      CourseInfo();
      virtual ~CourseInfo();
      void setCourseID(string &x);
      string getCourseID() const;
      void setYearTaken(string &x);
      string getYearTaken() const;
      void setSemesterTaken(string &x);
      string getSemesterTaken() const;
      void setGrade(string &x);
      string getGrade() const;
      void incrementCount(int &x);
      int getCount() const;
      
    private:
      string courseID;
      string yearTaken;
      string semesterTaken;
      string grade;
      int count;
      
};


#endif //COURSEINFO_H
#include "Person.h"
#include "Student.h"
#include "courseInfo.h"
#include "340.h"

int main()
{
   int choice = 0;       
	    
   Student NIU_Student; //creates a student object
   while (choice != 999)
   {
         cout << "\nStudent Registration Database" << endl;
         cout << "Please choose from the options below (type 999 to quit)\n" << endl;
		 cout << "0. Select this to read in from file" << endl;
         cout << "1. Enter new student information" << endl;
         cout << "2. Enter new class information for student" << endl;
         cout << "3. Edit student information (not valid)" << endl;
         cout << "4. Edit class information for student (not valid)" << endl;
         cout << "5. Print student information\n" << endl;
         cout << "Please enter your choice: (the press enter, 999 to quit)";
         cin >> choice;
         
   switch(choice)
   {
   case 0:
	{
		ifstream inFile;

		inFile.open("C:\\Documents and Settings\\Tony\\My Documents\\Visual Studio 2008\\Projects\\proj2\\file.txt"); //opens file
		if (!inFile)
		{
			cout << "\nThe input file does not exist!" << endl;
			return 1;
		}
		
		string value, courseID, year, semester, grade;
		NIU_Student.setFirstName(value);
		inFile >> value;
		NIU_Student.setLastName(value);
		inFile >> value;
		NIU_Student.setSSN(value);
		inFile >> value;
		NIU_Student.setDOB(value);
		inFile >> value;
		NIU_Student.setGender(value);
		inFile >> value;
		NIU_Student.setZID(value);
		
		inFile >> courseID;
		while (inFile)
		{
			inFile >> year >> semester >> grade;
			CourseInfo student;
			student.setCourseID(courseID);
			student.setYearTaken(year);
			student.setSemesterTaken(semester);
			student.setGrade(grade);
			//addCourse(student);
			inFile >> courseID;
		}

/*
		while (inFile)
		{

			//read in class info (courseName, courseYear, courseSemester, courseGrade)
			// be able to read in as many as needed - and add them to the linked list set up in Student.h
		}
		read a courseID
while (inFile)
  {
  read the rest of the values for a course

  create a CourseInfo object using the values you've read (doesn't need
    to be dynamically allocated)
  call addCourse() to add the CourseInfo object to the linked list

  read the next courseID
  }

Does that make sense? The addCourse() method should call addToHead(),
passing along the CourseInfo object.
		*/
		break;
	}

   case 1:
       {
	       string x;
	       cout << "Please enter the first name: ";
	       cin >> x;
	       NIU_Student.setFirstName(x);
	       cout << "Please enter the last name: ";
	       cin >> x;
	       NIU_Student.setLastName(x);
	       cout << "Please enter students social security number: ";
	       cin >> x;
	       NIU_Student.setSSN(x);
	       cout << "Please enter student DoB: ";
	       cin >> x;
	       NIU_Student.setDOB(x);
	       cout << "Please enter the student's gender: ";
	       cin >> x; 
           NIU_Student.setGender(x);
           cout << "Please enter students ZID: ";
           cin >> x;
           NIU_Student.setZID(x);
           break;
         }
    case 2:
         { 
           //string entry, 
            //      more;
           /*
		   do
           {        
             cout << "Please enter course name: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setCourseID(entry);
             cout << "Please enter year taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setYearTaken(entry);
             cout << "Please enter semester taken: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setSemesterTaken(entry);
             cout << "Please enter grade for course: ";
             cin >> entry;
             NIU_Student.courses[NIU_Student.getCount()].setGrade(entry);
            cout << "Enter another class? (Y/N): ";
            cin >> more;
            NIU_Student.incrementCount();
           } while (more == "Y" || more == "y");
		   */
           break;
         }
    case 3:
         {
           cout << "Choice entered was 3" << endl;
           break;
         }
    case 4:
         {
           cout << "Choice entered was 4" << endl;
           break;
         }
    case 5:
         {
		   NIU_Student.infoPrint();
         break;
         }  
    case 999:
         {
           cout << "Quitting..." << endl;
           break;
         }
    } // end of switch statement
    } // end of while
    
    return 0;
}
John Smith 333222333 01/01/80 M z11119
#include "Person.h"

/****************************************************************
   FUNCTION:   Person()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Person() constructor
****************************************************************/
Person::Person()
{
}

/****************************************************************
   FUNCTION:   ~Person()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Person destructor
****************************************************************/      
Person::~Person()
{
}

/****************************************************************
   FUNCTION:   setFirstName(const string &x)
   ARGUMENTS:  const string &x - the first name of student
   RETURNS:    none
   NOTES:      this function sets the students first name
****************************************************************/
void Person::setFirstName(string &x)
{
     firstName = x;
}

/****************************************************************
   FUNCTION:   getFirstname() const
   ARGUMENTS:  none
   RETURNS:    string firstName
   NOTES:      this function returns the students first name
****************************************************************/
string Person::getFirstName() const 
{
     return firstName;
}

/****************************************************************
   FUNCTION:   setLastName(const string &x)
   ARGUMENTS:  const string &x - the students last name
   RETURNS:    none
   NOTES:      this function sets the students last name
****************************************************************/
void Person::setLastName(string &x) 
{
     lastName = x;
}

/****************************************************************
   FUNCTION:   getLastName() const
   ARGUMENTS:  none
   RETURNS:    string lastName
   NOTES:      this function returns the students last name
****************************************************************/
string Person::getLastName() const 
{
     return lastName;
}

/****************************************************************
   FUNCTION:   setSSN(const string &x)
   ARGUMENTS:  const string &x
   RETURNS:    none
   NOTES:      this function sets the students SSN
****************************************************************/
void Person::setSSN(string &x) 
{
     SSN = x;
}

/****************************************************************
   FUNCTION:   getSSN() const
   ARGUMENTS:  none
   RETURNS:    string SSN
   NOTES:      this function returns the students SSN
****************************************************************/
string Person::getSSN() const 
{
       return SSN;
}

/****************************************************************
   FUNCTION:   setDOB(const string &x)
   ARGUMENTS:  const string &x - the students DOB
   RETURNS:    none
   NOTES:      this function sets the students DOB
****************************************************************/
void Person::setDOB(string &x) 
{
     DOB = x;
}

/****************************************************************
   FUNCTION:   getDOB() const
   ARGUMENTS:  none
   RETURNS:    string DOB
   NOTES:      this function returns the students DOB
****************************************************************/
string Person::getDOB() const 
{
       return DOB;
}

/****************************************************************
   FUNCTION:   setGender(const string &x)
   ARGUMENTS:  const string &x - the students gender
   RETURNS:    none
   NOTES:      this function sets the student gender
****************************************************************/
void Person::setGender(string &x) 
{
     gender = x;
}

/****************************************************************
   FUNCTION:   getGender() const
   ARGUMENTS:  none
   RETURNS:    string gender 
   NOTES:      this function returns the students gender
****************************************************************/
string Person::getGender() const 
{
       return gender;
}
/****************************************************************
   FILE:      Person.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class Person information / prototypes 
****************************************************************/
#ifndef PERSON_H
#define PERSON_H

#include "340.h"

class Person {
	public:
      Person();
      virtual ~Person();
     // void infoPrint(); 
      void setFirstName(string &x);
      string getFirstName() const;
      void setLastName(string &x);
      string getLastName() const;
      void setSSN(string &x);
      string getSSN() const;
      void setDOB(string &x);
      string getDOB() const;
      void setGender(string &x);
      string getGender() const;
      
    private:
      string firstName;
      string lastName;
      string SSN;
      string DOB;
      string gender;
};

#endif //PERSON_H
/****************************************************************
   FILE:      SinglyLinkedList.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class SinglyLinkedList information / prototypes 
****************************************************************/
#ifndef SINGLYLINKEDLIST_H
#define SINGLYLINKEDLIST_H

#include "340.h"

template <class ItemType>
class nodeSLL
{
	public:
		nodeSLL() {next = 0;} // default constructor
		nodeSLL(ItemType value = NULL, nodeSLL *in = NULL) {info = value, next = in;} // if called with variable
		~nodeSLL() {}
		ItemType info;
		nodeSLL<ItemType> *next;
};

template <class ItemType>
class SinglyLinkedList
{
	public:
		SinglyLinkedList() { head = tail = NULL;}
		~SinglyLinkedList();
		int isEmpty() {return head == NULL;} // checks to see if list is empty
		void addToHead(CourseInfo);
		void deleteNode(const ItemType& delItem);
		nodeSLL<ItemType> * r_deleteNode(const ItemType& delItem, nodeSLL<ItemType> *ptr);
		bool isInList(ItemType) const;
		void addCourse(const CourseInfo&);

	private:
		int count; // variable stores # of elements in list
		nodeSLL<ItemType> *head; //pointer to first node in list
		nodeSLL<ItemType> *tail; //pointer to last node in list
};

template <class ItemType>
void addCourse(const CourseInfo& courseStuff)
{
	addToHead(courseStuff);
}

template <class ItemType>
SinglyLinkedList<ItemType>::~SinglyLinkedList() 
{
    while(head != NULL)
    {
        nodeSLL<ItemType>* p = head->next;            
        delete head;
        head = p;
    }
}


template <class ItemType>
void SinglyLinkedList<ItemType>::addToHead(CourseInfo value)
{
	head = new nodeSLL<ItemType>(value, head);
	if (tail == NULL)
		tail = head;
}

template <class ItemType>
void SinglyLinkedList<ItemType>::deleteNode(const ItemType& delItem)
{
	head = r_deleteNode(delItem, head);
}

template <class ItemType>
nodeSLL<ItemType> * SinglyLinkedList<ItemType>::r_deleteNode(const ItemType& delItem, nodeSLL<ItemType> * ptr)
{
	if (ptr == NULL)
		return NULL;
	else if (delItem == ptr->info)
	{
		nodeSLL<ItemType> * next == ptr->next;
		delete ptr;
		return next;
	}
	else
	{
		ptr->next = r_deleteNode(delItem,ptr->next);
		return ptr;
	}
}

template <class ItemType>
bool SinglyLinkedList<ItemType>::isInList(ItemType value) const
{
	nodeSLL<ItemType> *tmp;
	for (tmp = head; tmp != NULL && !(tmp->info == value); tmp = tmp->next)
		return tmp != NULL;
}
#endif //SINGLYLINKEDLIST
#include "Student.h"


/****************************************************************
   FUNCTION:   Student()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the Student class constructor
****************************************************************/
Student::Student()
{
	count = 0;
}

/****************************************************************
   FUNCTION:   ~Student()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this is the destructor for the Student class
****************************************************************/   
Student::~Student()
{
}

/****************************************************************
   FUNCTION:   incrementCount()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      This function increments count so that the number
               of classes added are counted on entry
****************************************************************/
void Student::incrementCount()
{
	count = count + 1;
}

/****************************************************************
   FUNCTION:   getZID()
   ARGUMENTS:  none
   RETURNS:    ZID - returns the students ZID number
   NOTES:      This function simply returns the students ZID#
****************************************************************/
string Student::getZID() const
{
     return ZID;
}

/****************************************************************
   FUNCTION:   setZID(const string &x)
   ARGUMENTS:  string x
   RETURNS:    none
   NOTES:      this function sets the students ZID with the value
               passed to it.
****************************************************************/
void Student::setZID(string &x)
{
     ZID = x;
}

/****************************************************************
   FUNCTION:   getCount() const
   ARGUMENTS:  none
   RETURNS:    int count
   NOTES:      this function returns the count of the number of 
               classes added to the students registration etc
****************************************************************/
int Student::getCount() const
{
	return count;
}

/****************************************************************
   FUNCTION:   infoPrint()
   ARGUMENTS:  none
   RETURNS:    none
   NOTES:      this prints the students information, including the
               basic information, aswell as class information
****************************************************************/
void Student::infoPrint()
{	
  cout << getFirstName() << " " << getLastName()
       << " " << getSSN() << " " << getDOB()
       << " " << getGender()<< " " << getZID()
       << endl;      
    
	/*
	int count = 0;          
	while (count <= getCount())
           {
             cout << setw(8) << getCourseID() << " " 
                << setw(5) << getYearTaken() << " " 
                << setw(7) << getSemesterTaken() << " " 
                << setw(3) << getGrade() << endl;
             count++;
           }
 */
		   }
/****************************************************************
   FILE:      Student.h
   AUTHOR:    Anthony Hogan
   LOGON ID:  Z109079
   DUE DATE:  1/23/2009

   PURPOSE:   Includes the class Student information / prototypes 
****************************************************************/
#ifndef STUDENT_H
#define STUDENT_H

#include "Person.h"
#include "courseInfo.h"
#include "SinglyLinkedList.h"
#include "340.h"


class Student : public Person {
	public:
      Student();
      virtual ~Student(); 
      string getZID() const;
      void setZID(string &x);    
      void incrementCount();
      int getCount() const;
      void infoPrint(); 
      SinglyLinkedList<CourseInfo> courses;
    
	private:
      string ZID;
      int count;
    
};

#endif //STUDENT_H
This article has been dead for over six months. Start a new discussion instead.