call function from function


lets say i have a function
i want to call anthor function(function2) from the original function (function1)
for example :
1
2
3
4
5
6
void function1()
{ // there is switch statement
switch(blah)
        case1: function2();// every time i do it he keep saying this function is not decleard !!!
           break;


Where have you written your second function?
outside function 1 and i want to call it through function 1 ??
Can you post your code for both functions please
My guess is you have this situation:
1
2
3
4
5
6
7
8
9
10
11
function2(); // <-- Function 2 needs to be declared before it is used like this. Perhaps what you are missing?

function1()
{
    function2();
}

function2()
{
//All of function 2 is written in here...
}


Topic archived. No new replies allowed.