Oh I see what you mean. You mean the insertFunction should insert the first member of the list and then the second etc instead of having those things already set up in main. Got ya. Yeah that makes...
Type: Posts; User: sdbuilt
Oh I see what you mean. You mean the insertFunction should insert the first member of the list and then the second etc instead of having those things already set up in main. Got ya. Yeah that makes...
Huh? My program doesn't crash.. It removes the desired entry from the list as long as it isn't the first entry. I am not worried about that corner case I am just trying to understand the concepts. I...
Well I solved it .. no thanks to you guys! Lol j/k. Here is what I put.
void removeEntry (struct entry *remove)
{
remove->previous->next = remove->next;
}
I understand that my remove function just changes the pointer to the previous entry, and not the actual entry itself. How can I actually change the previous entry though so that its .next is the same...
Hello, I am trying to delete an entry from a doubly linked list, where the function takes a pointer to the entry to be removed as its argument. I have tried various different things, and I can get...
sorry I just read this.. the solution was that I was not inputting the initial values into the main function right. I thought that I type ./caesar and press enter and then it will prompt me for the...
I figured it out never mind. Anyone know how to delete a post?
ok so I replaced the getString portion of the code with simply declaring a string called "word". That way I could determine if that was the issue. Apparently it is not because I am still getting a...
Hey guys I am working on implementing a simple cryptography program called Caesar. I got this program to work perfectly when I was writing a function to handle the cryptography and just declaring the...
oh ok duh that worked thanks
I am trying to come up with a function that receives as input an integer and then prints out a string based off the integer received. For example, I want it to receive '0' and print out "one." Here...
perfecto.. I got it now thanks christop. Don't know why I put j = 1 in the loop itself. I appreciate your help.
Considering I am not even at pointers yet, I want to do it myself at as low level as possible. One of the problems I am running into is that when I google atof I am not quite sure what I am looking...
Say I want to look into the details of how a function works because I have been trying to come up with my own version of it and it is falling short.. how would I do that?
For example the atof()...
Gotcha thanks for your help.
Any idea how I could terminate the loop right when I get to the null character but include the null character? Or do I have to just add it in manually like I am doing now and like you suggested?
Ding ding ding! And the winner is Matticus!!! Thanks for your fresh eyes man. You have solved it! It works perfectly now.
first of all thanks for your help adak :) I went ahead and renamed remove to remove1. Still no go. Also, I went ahead and did the printf of the source last night and it puts it in in the removeString...
Ok I did as you said and tried that code.. (I had to take out the "i" variable in main as it was not used but it compiled after that).. after trying to use s1 as both "1" and "two" and s2 as both...
bumpety bump!
also, I don't use prototypes because I do not know what they are.. I just started learning programming and I am going straight from what they teach me in the book I got (Programming in C by Kochan)
adak:The code you posted in post #21 ends up having the same problems that I have.. i.e it terminates in a bunch of crazy weird characters instead of a clean null character. Andreas: I went ahead and...
I see that I get these weird values after the removeString function so I am going to work on that one so that I get a solid '\0' at the end.. If you have any ideas how to fix that function I am all...
I am not sure what compiler you are talking about or how to use it. I definitely would like to use it if you give me some more info.. I am using the make compiler and it didnt catch that count1 was...
OK so I am trying to test it like you said, and the first place I can check for what is in my source string is after running it through the findString function in the replaceString function. I leave...