Thanks for the response.
Quote:
Your c style strings have a size of SIZE. That means that array indexes 0 through SIZE-1 are valid. In all your initialization code, you set buffer[SIZE] = '\0', which is writing to memory off the end of the array. You should declare you char arrays to be size SIZE+1, or always set SIZE-1 to null. (Note: when I initialize char arrays to null, I just use memset to set the entire thing to 0).
Doesn't the below code initialize all locations of the array to '\0'?
Code:
buffer1[SIZE]='\0';
And what does memset do? I have never seen that before.
Quote:
In your orderedList method, you never change list->current, so it goes into an infinite loop. Are you supposed to be setting list->current to list->current->next after each pass through the loop?
Thanks I fixed that and it at least merges the lists now, but still the sort doesn't work.
Quote:
I don't remember any of your other posts, so I don't know if anybody has mentioned it, but you should probably learn the standard string class. If this is for an assignment and you aren't allowed to use it, that sucks for you, but you should still learn on your own when you get a chance.
My teacher has never shown us how to use these. My books do not state anything of relivence on this. And what I've read from the below url has shown me nothing but compile errors. Do you know of another location for beginer details on string classes?
ANSI string class
Quote:
Again, you might have heard this over and over, but why do you use <iostream.h> and void main()? Both are wrong.
I have never been told this before. I thought void main() was ok due to I'm not returning anything. And as for <iostream.h> I have tried to replace it with <iostream> and using namespace std;. That also creates massive amounts of compile errors.