-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudent.h
35 lines (29 loc) · 812 Bytes
/
student.h
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
/*
*This is a header file that declares the structure Students
*Implementation of the same can be found in student.cpp
*/
#ifndef __STUDENTS__
#define __STUDENTS__
#include <string>
#include <iostream>
using namespace std;
struct Students{
Students *next;
int rollNo; //Stores roll no.
string name; //Stores name
double marks; //Stores marks
//Overloading << operator to use in cout
friend ostream& operator<< (ostream&, Students&);
friend istream& operator>> (istream &input, Students&);
//To check equality of two operator.
bool operator== (Students) const;
//Some constructors including one copy constructor
Students ();
Students (const Students &);
Students (int, string, double);
~Students (); //Destructor
};
typedef Students node;
typedef node *link;
typedef link Node;
#endif