I am trying to change the address in an array using *nums++. When I run the program, however, the first number in the array is skipped. What am I missing? How do I get the first number to display?
>What am I missing? How do I get the first number to display?
Move #define NUMBERS 7 outside of main so the function print can see it.
In print() remove i= *nums++ which is doing harm and producing nothing since you change the value of i inside the loop to start at 1 anyway.
Move #define NUMBERS 7 outside of main so the function print can see it.
In print() remove i= *nums++ which is doing harm and producing nothing since you change the value of i inside the loop to start at 1 anyway.
I tried this and now I have the opposite problem. The last number doesn't print. Suggestions?
Last edited by RenFromPenn; Dec 28th, 2008 at 5:48 pm.
Well, since I am the original poster, I can say that my question was answered. I was just about to ask if there was a way to mark this as solved when I looked up and saw it right above this box. Sorry I didn't mark it previously. I'm new hear and still learning how the forum works. :-)
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.