2 Replies - 1331 Views - Last Post: 01 March 2011 - 04:11 PM Rate Topic: -----

#1 program noob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 01-March 11

Simple Linked List Class

Posted 01 March 2011 - 04:01 PM

My assignment is bellow, I have tried many different things, I have this so far, got some help on it already but once we got to this chapter I got lost.
struct Node
{
int data;
Node *next;
};


design a simple linked list class with only two member functions and a default constructor:
void add(double x);
boolean isMember(double x);
LinkedList( );
The add function adds a new node containing x to the front (head) of the list, while the isMember function tests to see if the list contains a node with the value x. Test your linked list class by adding various numebrs to the list and then testing for membership.

Is This A Good Question/Topic? 0
  • +

Replies To: Simple Linked List Class

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: Simple Linked List Class

Posted 01 March 2011 - 04:08 PM

You're going to have to show more effort than that to get help. Check out our tutorials also.
Was This Post Helpful? 0
  • +
  • -

#3 sk1v3r  Icon User is offline

  • D.I.C Addict

Reputation: 231
  • View blog
  • Posts: 668
  • Joined: 06-December 10

Re: Simple Linked List Class

Posted 01 March 2011 - 04:11 PM

you were told to design a class... You have made a struct
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1