#need help with functions (beginner level)
1 messages · Page 1 of 1 (latest)
but what does the second function mean
and should it be
int instructions(int option)
```?
my goal is to make the user answer with a listed number (1 - 3), and then return the integer they input back to the main program to be used in an if statement depending on the value
if anyone reaches out to me, please @ me, thanks 🙏
the int means the return type must be int
for instance, you've got there a string return value, return it
cin is asking for user's input, it writes into option, its type is int
so basically, u need to convert that int into string
and return it
@red pollen
ofc the most optimal variation would be to return an int, no need for string if u wish to have a number returned