Click here to Skip to main content
15,905,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I add 2 data like book no and book name in my library management system project.i.e int and char in doubly link list at same time?

[edit]SHOUTING removed - OriginalGriff[/edit]
Posted
Updated 7-Oct-13 3:56am
v2
Comments
OriginalGriff 7-Oct-13 9:55am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
We know nothing about what data structures you are using, or how you have organised and created your linked list - so we would have to start guessing, and that isn't a good basis for computing...
Use the "Improve question" widget to edit your question and provide better information.
Captain Price 7-Oct-13 12:56pm    
on the spot. Very true.
OriginalGriff 7-Oct-13 9:56am    
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously.

hi,
Actually SA is right to say that the question is ambiguous but i'll answer based on guess work :)
Each node of your doubly link list should have 4 fields; 2 for forward and backward traversing and 1 for storing int(book number) and 1 for storing char(book name). Now whenever you are filling the node, you have to populate both fields.(Fields of a structure can be of different data types...if that was your concern)
For example if the user is filling the book number, make it mandatory to fill the book name as well.
Please comment if you are facing other issues.

hope this helps!
 
Share this answer
 
Create a class for your Book details and use one of the C++ collection classes to create the list.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900