Non-void function

Sep 19, 2010 at 9:34pm
i need to prompt user by name to enter a favorite number.
im trying to creat a non-void function to send the user's name and obtain and return favorite number as an int.
i need help.
anyone??
Sep 19, 2010 at 9:37pm
Help with what exactly?
int nonVoidFunction(const string& name)
Sep 19, 2010 at 9:43pm
i got the user's name with a non-void function
now i need to come up with another non-void function asking the user to enter a number. in this function it needs to show the user's name obtain and return the favorite number as an int.
Sep 19, 2010 at 9:46pm
Yeah, the prototype of that function is above.
Although I can't see why you would have problems coming up with that yourself if you already did exactly the same for getting the name.
Sep 19, 2010 at 10:48pm
I don't think you fully understand basic functions, research them. The fact that you called it a non-void function and not an int returning function suggests that you've never made a function that didn't return void before
Topic archived. No new replies allowed.