Nov 5, 2017 at 10:14pm UTC
makes something appear on the screen.
sends a value back from a function to the function that called it. return
They're completely different things.
It sounds like you're asking "How can I return the value from my function?" If that is what you're asking, like this:
Nov 5, 2017 at 10:16pm UTC
Thank you, but I want the word to be between *word* and the star/end markers are the ones outputting the * or whatever start/end markers inputed in the main function
Nov 5, 2017 at 10:19pm UTC
Now it sounds like you're asking:
How can I return ?
You need to get a lot better at asking questions.
Nov 5, 2017 at 10:28pm UTC
ok I'm sorry, I have a function for starting and ending markers, I want the word to be between whatever those markers are set to , and thats what I need to return. for example if the start marker was set = * and the end marker was set = / I need the output to be "*word/"
Nov 5, 2017 at 10:29pm UTC
it worked fine when I had it cout << start << word << end, however, the autograder we use didn't let that work
Nov 5, 2017 at 10:32pm UTC
If start and word and end are of type
return (start + word + end);
Definitely time to learn what a C++ function is and how to return values. Without that, you are really not going to get far.