Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,999 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,325 people online right now. Registration is fast and FREE... Join Now!




Data Structures -Linked List

 
Reply to this topicStart new topic

Data Structures -Linked List

jmbn2k
1 Dec, 2006 - 09:52 PM
Post #1

New D.I.C Head
*

Joined: 1 Dec, 2006
Posts: 2


My Contributions
HI.........
Iam a fresher.......can anyone get me the code for adding two data items within a function in a linked list?
User is offlineProfile CardPM
+Quote Post

ifoam
RE: Data Structures -Linked List
1 Dec, 2006 - 10:32 PM
Post #2

D.I.C Head
**

Joined: 26 Oct, 2006
Posts: 54



Thanked: 1 times
My Contributions
CODE

struct Node
{
    Node(int d, string f) : data(d), fname(f), next(0) { }  
    Node *next;
    int data;
    string fname;
};

Node *ptr;
ptr = new Node(25, "John");

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 08:25PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

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