I am not sure how to enter a function prototype for a function named getPrices that will return a float value and has one float parameter (with a default of 10.00).
Is there anyone that can help me out.
Thanks
Nazma
I am not sure how to enter a function prototype for a function named getPrices that will return a float value and has one float parameter (with a default of 10.00).
Is there anyone that can help me out.
Thanks
Nazma
The function prototype is the same as the function name except with a semicolen, ie:
Please make more specific titles in future posts.Code:getPrices(float poop); //prototype int main() { getPrices(poop); //call return 0; } getPrices(float poop) //function { return poop; }
Well, there are a few things wrong with your code:
1) It does not work.
2) It does not work.
3) It does not work.
Hope this helps.
and with default value..
Code:#include <iostream> using namespace std; float getPrice(float arg=10.0); int main() { cout << getPrice() << endl; system("PAUSE"); } float getPrice(float arg) { return arg; }
Seems like there's plenty of people willing to play chef, too.Originally posted by Salem
Ahhh - I love the smell of freshly baked homework in the morning....
Anyways, what time zone are you in?
@Nazma: A tutorial would be a good place to start.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]