Suprisingly you almost exactly reproduced the original code.
I have attempted to ask my teacher why or even how. What he does is simply for a lesson get up in the middle of class and read straight out of the book and assign projects. I tried working on this for at least 45 minutes yesterday. The problem was I had to using calling (i think its called) by reference. I have to use '&' infront of the variable im passing to the function to ask the user for the input. The problem was I could not figure out what part of the program was continously giving me errors. So After I would solve one of them, I would get another 4 ridiculous errors.
Maybe I have to go on my own, because this just seems to get more confusing to me. The code I follow from the material is always incomplete, and I have yet to see a fully functional program even use this. All I got was the void function which sends the variable back to the main function, so I have no idea how to declare these, call them, or pretty much do anything with them. Any help would be appreciated.




Reply With Quote