can you call a function inside that same function so that it goes to the beginning of that code to execute it. So even though ur already in the prompt function can u still call it again from withing the code inside the prompt function. Thanks in advance.
cam875
1
Junior Poster
Recommended Answers
Jump to PostYes, you can, it is called recursion. Look it up on net
Jump to Post>can you call a function inside that same function
If I understood that correctly then..If you call a function while your already in it, you have recursion. Take this as an example.
#include <iostream> using namespace std; void CountDown(int number) { if (number != 0) …
All 6 Replies
Sci@phy
97
Posting Whiz in Training
William Hemsworth
1,339
Posting Virtuoso
ArkM
1,090
Postaholic
cam875
1
Junior Poster
William Hemsworth
1,339
Posting Virtuoso
akshaykeerthi.srikanth
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.