1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
void func_3()
{
cout << x;
};
void func_2()
{
func_3();
};
void func_1()
{
func_2();
};
int main()
{
string x;
func_1();
return 0;
}
|
Also in
main variable x defined, in
func_3 used. I must pass this as parameter from
func_1 to
func_2 to
func_3 or can easier?
Last edited on
You can not do that because func_1 does not accept any parameter.