C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-11-2008, 08:34 PM   #1
Registered User
 
Join Date: Sep 2008
Posts: 7
Exclamation String overwrites every string in linked list

removed

Last edited by SkidMarkz; 09-12-2008 at 09:10 AM. Reason: school assignment
SkidMarkz is offline   Reply With Quote
Old 09-11-2008, 08:40 PM   #2
and the Hat of Guessing
 
tabstop's Avatar
 
Join Date: Nov 2007
Posts: 8,740
Because this line:
Code:
new_node->make = make;
does not, and never has, copied a string from one place to another. If you wish to copy a string from one place to another, you must use the string copy function strcpy.
tabstop is offline   Reply With Quote
Reply

Tags
linked, list, overwrite, string, struct

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
String editor for a sentence inputted by a user - any suggestions or ideas? the_newbug C Programming 4 03-03-2006 02:11 AM
How can I traverse a huffman tree carrja99 C++ Programming 3 04-28-2003 05:46 PM
Linked List jpipitone C Programming 4 03-30-2003 09:27 PM
Adding To The Middle Of A Linked List LostNotFound C++ Programming 1 02-23-2003 06:02 PM
Template Class for Linked List pecymanski C++ Programming 2 12-04-2001 09:07 PM


All times are GMT -6. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22