Thantos, your code did the trick. Thanks everyone for your input.
Type: Posts; User: Thumper333
Thantos, your code did the trick. Thanks everyone for your input.
There it goes again! Beat to the post. :p Thank you all for your help. I think that looks more like what I'm trying to do. You all are great though! :D
I see what you both mean. I just kept thinking in terms of converting to the character since it seemed like it was between 0 and 255, but now I can just try changing it to an int instead. How would...
Hey xErath, you actually just beat me to posting while I was so I'm checking out your solution right now... thanks :)
Thanks Stack Overflow, I know about character arrays even though that was a great explanation, but that would be too simple of a question. The problem I'm having is that I need for example:
...
I have an interesting problem in a program I'm working on. I have input strings from a file that I'm reading in one by one that are supposed to be used as a hex value later but I'm supposed to store...
Thanks anonytmouse, for some odd reason i felt like leaving out the header. That worked though... :)
I have this warning on a bit of code I can't seem to correct. The code compiles just find but I'd rather not have any warnings. Can anyone correct this?
198 [Warning] assignment makes pointer...
I'm making a program that's supposed to have a binary search of an array that has already been sorted by qsort( ). The qsort( ) function worked perfectly and outputted the correct sorted array, but...
Thank you both. I know I needed to be more specific... Sorry about that. The '\0' worked. Thanks a lot you two. :)
How would I set a string to NULL from another function? I tried to use
strcpy(string, NULL);
but it does not seem to work and I've also tried
Thanks a lot Thantos. For some reason I didn't even think of using strcpy( ). That did the trick. :)
I've used strtok() before to parse a string, but for some reason I cannot seem to use it in separate functions correctly. I'm trying to separate strings in one function and initialize them in the...
Thanks a lot Hammer! I corrected my code and it works! :) Much appreciation...
I've searched online on the qsort( ) function and on this forum but cannot seem to find a lot of information on how to sort an array of structs. I seemed to get this code to compile but when I go to...
Thank you both! You two have solved my problems... well at least the current problems. I've also learned a good amount. Thanks a lot!
You might try it like this:
if(prft1==0)
printf("You have broken even from selling goldfish. \n", prft1 );
else if(prft1>0)
printf("Your profit from selling goldfish is $%.2f....
I'm trying to work on a program that inputs entries from a file and then builds a hash table. I'm a little new to programming so I know I do not have the best form. I only submitted the code that I...
Thank you very much! I'm a little new to programming so hopefully I can improve. I appreciate the mods greatly! I just need to keep practicing and maybe pick up some good habits... :)
Help all! :-) I'm trying to initialize a hash table for a C program and somehow I keep getting errors when it comes to the add() function. I have an array of linked lists and can't seem to get the...