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

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




symbol table implementation

 
Reply to this topicStart new topic

symbol table implementation, can we implement symbol table in C++ using Link List.is it neccessary

nikki123
post 30 Aug, 2008 - 09:27 AM
Post #1


New D.I.C Head

*
Joined: 10 Aug, 2008
Posts: 5

can we implement symbol table in C++ using Link List.is it neccessary to implement symbol table using Hash table?
i want to make a program in C++ for symbol table creation.can i make it with link list concept or should i use hash table implementation.
please tell me the logic or some website link from where i get the help.

i am writting my logic.please give me suggestions.

CODE

struct s_table
{
     char name[30];
     char addr[20];
     struct *s_table;    
};


in the above structure i have used name array for storing symbol name and addr for storing its address.
i have written the code for single link list node creation and display the content of node.
am i doing right.please help me.
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 30 Aug, 2008 - 05:23 PM
Post #2


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,857



Thanked 47 times

Dream Kudos: 550
My Contributions


Well there is no reason why you can't implement a symbol table in a linked list... on the other hand, you will want to be able to quickly find things and the linked list has a linear search... So it is not the best choice.

However if you are only compiling small programs or not worried about performance then this is probably ok.

User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/22/08 07:52AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month