Please note this code is most likely terrible. It's very rough. And before anyone insults me I know I probably seem like an idiot and in programming I pretty much am.
The only one insulting you is you. You code is nicely modular. Each function is defined to do one job. It's formatted. All in all, good code.
The only problems are:
1) using namespace std; only needs to be at the top of the program
2) using system("pause"); -- there are better ways
3) Not accepting the return value crom calc() -- you returned a value but never put it anywhere (this is the fix)
Oh, yeah, and CODE Tags...
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Please post the code you have now.
NathanOliver
Veteran Poster
1,084 posts since Apr 2009
Reputation Points: 215
Solved Threads: 189
What happened to your formatting? You broke it...
The system pause was really part of my rough coding, I've redone the program so many times by the time I finally asked for help that the proper ways were just not what I wanted to go through at the time.
Excuses, excuses... :icon_wink:I fixed most everything I am still having one strange problem the minutes are coming up as only 2 no matter what value I put in for it.
Not so strange. What variable gives you the 2? And where did you load a value into it?One more thing I'd like to add is that I'm not quite sure where to put my repeat function. I've tried it in several locations and it doesn't seem to work anywhere.
What repeat function?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I ended up having the input for the hours and minutes be seperate, not really what was required but it was the only thing that would fix the minutes error.
So I take it you found out why you got a 2 and fixed it. I'm assuming so because you didn't respond directly to my questions.I need a repeat function so anyone who uses the program can repeat it as many times as they want. But I can't seem to put it somewhere so it works...It's not there because I haven't found an appropriate solution yet.
Well, it looks like you tried, not with afunction but with a do-while, which is more appropriate than a function....
and I messed up my formating? :( I didn't even notice..
.... and thedo-while is where you messed up your formatting.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944