I'm embarrassed. I didn't have brackets around my else statement so it was blowing up. All is well in the universe again. =)
Type: Posts; User: rwagstaff
I'm embarrassed. I didn't have brackets around my else statement so it was blowing up. All is well in the universe again. =)
Hurry I need to finish this so I can release it virally on December 21, 2012. All will be well with the universe I promise. =)
I am so confused. Input # of disks, start peg and end peg. My program is failing miserably yet it is pretty much the exact code that supposedly works. The function keeps subtracting one until it...
Thanks got it. And just to confirm fgets() is better than scanf() right??
Ok I am puzzled once again. I just don't understand how C and these functions work. I am trying to find the length of a string that is input. Two problems show up: 1) It appears fgets() is storing...
Thanks again guys. What's a good web site that has a C function reference?? Basic definitions, use, examples and the like. Just to clear up some of the mystery the assignment is to input a...
I'm just amazed at the relative barbaric nature of C. I've done a little programming in ASP VBScript, Excel/Word Macro languages and this C language is like pulling teeth. Doing simple things are...
My mistake with the code above (double quotes). In my actual program I am sending a single char (e.g. HexValue(str[0])). It works fine however I figure I might be going about it the hard way. ...
Why does it number the code with strange numbers and put a huge amount of blank white space at the bottom when I submit code blocks???? Anyone??? I'm a newbie. =)
Well I am just a noob trying to learn how to program. I appreciate your help everyone. Please review the function below and discuss my ineptness. Thanks a bunch!! =)
int HexValue(char c)...
Thanks for all your help people. I ended up just creating a function that accepts a char and returns an int. Switch statement with every option for 0-9 and AaBbCcDdEeFf. Pain in the ass but I...
Yah I've been looking at the ASCII table but "2" + "7" should equal 9 not 105 (50 + 55). I need "B" to equal 11 and "F" to equal 15, etc. Create my own lookup in the c program???
I am looking to convert a string (e.g. "F8A2" or "-927") into its numeric value. I figure I need to do it one char at a time but how does "A" become "10" and "9" become the value 9. I need to do...
Thank you Adak that works perfectly. I think I also figured out how to clear that one character in buffer. I just used getchar(); and it seems to work properly now.
All the best!! =)
I have a conceptually easy task however I am running into all kinds of problems. The idea is to have a C program give an menu option to the user and then repeatedly ask for strings that will be...