SOLVED thanks to matsp, deleted because it's assignment work and don't want someone to copy important bits
SOLVED thanks to matsp, deleted because it's assignment work and don't want someone to copy important bits
Last edited by JFonseka; 10-23-2007 at 06:06 AM.
SourceCode:strcpy(command, node->name);
Destination
Are you sure you are copying the right way around?
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Hehe thanks, it works now !
Did you look at strcpy prototype?
Code:char * strcpy ( char * destination, const char * source );
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Yes, deleting your post as soon as you think you've got an answer prevents anyone else from contributing, or from learning.
> because it's assignment work and don't want someone to copy important bits
If this bothers you, don't post your assignment code but instead create a small example which demonstrates the problem you're facing.
- trying to do this can tell you the problem anyway, even without having to post anything.
- simple examples are much quicker for us to work through.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Oh ok sorry, I'll keep that in mind.