I have a few functions. Function A will get input from the user as will function B. Function C is to use data from functions A and B and calculate a value. I am getting compiling errors:
homework5.cpp: In function ‘int main()’:
homework5.cpp:13: error: too few arguments to function ‘float burninations(float, float)’
homework5.cpp:22: error: at this point in file
Sorry, I am new to the forums, haven't figured out how to post code yet.
What should I have in my main()
would it be burninations(level, diameter)
"You call Function A and B from C but you aren't storing the return value, so this is pointless."
Could you explain a little more. Functions are obviously very hard for me to grasp.
I think you should decide exactly what it is you want to accomplish, because this code looks as if you are not sure what you want it to do.
Could you explain a little more.
Function A and B return a float value, but your code in function C is simply calling them and not storing the return value, which doesn't accomplish anything.
What I want function C to do is use the anger_level (Function A) and arm_diameter (Function B) values that were user input, and do some math with them. I want the math that is done to be stored as burnats and output this to the user.
I don't doubt that this is the most confusing code, and I really don't have much idea of what I'm doing when it comes to calling and passing functions. I learn best by example, but the examples are too hard to follow.
Bookmarks