#include #include #include using namespace std; /* This program counts the number of times a function is called. * Gives an illusion of the program being self aware. * The variable "count" is passed by reference. This eans it is just a nickname for the actual parameter. * Any changes made to count will be preserved across the function calls * and will be reflected as changes to the variable "number" * Over here, every time the function is called, it prints the given text and increments the count. */ void selfCounter(string text, int &count) { cout<<"Given text: "<>userInput; getchar(); while(strcmp(userInput.c_str(), "Stop")!= 0)//As long as the user did not enter "stop" { selfCounter(userInput, number); cin>>userInput; } cout<<"The function was called "<