Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 135,950 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,695 people online right now. Registration is fast and FREE... Join Now!




sparse table

 
Reply to this topicStart new topic

sparse table

arwa
11 May, 2008 - 02:34 AM
Post #1

New D.I.C Head
*

Joined: 5 May, 2008
Posts: 2

i want to creat a sparse table such that it contain a student number, the class he took and the grade he got, i dont now how to inter the data to the table and how to print it out from the table
CODE
using namespace std;

class node
{
public:
    int studentNumber;
    int classNumber;
        char grade;
    node *nextStudent;
    node *nextClass;
    node()
    {
        nextStudent = NULL;
        nextClass=NULL;
    }
    node(int x ,int y ,node *next1 = NULL , node  *next2=NULL)
    {
        studentNumber = x;
        classNumber=y;
        nextStudent = next1;
        nextClass=next2;
    }
};


class  list
{    
    public:
        list()
    {
            head = tail = 0;
        }
    private:
        node *head, *tail;
    
};



void main()
{
    
} :rolleyes:  :rolleyes:

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 09:03AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month