#include <iostream>
usingnamespace std;
void Function_One()
{
cout << "You are in Function_One." << endl;
cout << "Function_One called no one." << endl << endl;
}
void Function_Two()
{
cout << "You are in Function_Two." << endl;
cout << "Function_Two will call Function_One." << endl << endl;
Function_One();
}
void Function_Three()
{
cout << "You are in Function_Three." << endl;
cout << "Function_Three will call Function_Two." << endl << endl;
Function_Two();
}
int main()
{
Function_Three();
Function_Two();
Function_One();
return 0;
}
Q10: Please state a rule about where functions must be declared (i.e. scope) when compared to the location of the function call that you observed in the program in Step 1?
i want to say Global scope but now, i'm confused. I really don't understand what is this question asking me. Can somebody help me break it down
That question doesn't make any sense to me either. The function definitions within your example are in global scope, as you observed.
Their "declarations" (also called "prototypes", "forward declarations", etc...) should be within the same scope, but they do not necessarily have to be within the same compilation unit.
Also, on another note, when was C++Shell added to this site? I really like it! :)