Restarting a function

Write your question here.
Is there a way to restart a function after you gather input from the user.
1
2
3
4
5
6
7
8
9
  Put the code you need help with here.
choice(){
cin >> input;

cout << "You died\n";

(restart function to get a different choice)

}
I believe you can just call the function at the end of your function. It's called recursion. You can watch a video about it here - https://www.youtube.com/watch?v=RgCi5s8oITM or google some info about it.
Topic archived. No new replies allowed.