Stop send value to next function
<p>I have this working code:</p>

<pre><code>/* Include files */
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;limits&gt;

using namespace std;

void fnMainMenu(char s);

/******************************************************************************
* Function: fnUpdateSalary
* Description: Update employee salary
******************************************************************************/
void fnUpdateSalary()
{   
    int choice = 0;
    char data = 'a';
    incorrect_input: // goto teleport exit :)
    cout&lt;&lt;"\n\t=======================";
    cout&lt;&lt;"\n\tWelcome\n";
    cout&lt;&lt;"\t=======================\n\n";
    cout&lt;&lt;"1. Update employee salary\n";
    cout&lt;&lt;"2. Main menu\n";
    cout&lt;&lt;"3. Exit system\n";
    cout&lt;&lt;"\n &gt;&gt; ";

    cin&gt;&gt;choice;
    cin.clear();
    cin.ignore(numeric_limits&lt;streamsize&gt;::max(),'\n');

    switch(choice){
        case 1 : 
            //fnUpdateSalary();
            break;
        case 2 : 
            fnMainMenu(data);
            break;
        case 3 : 
            exit(1);
            break;
        default :   
        cout&lt;&lt;"Input not recognized. Please enter the correct input.\n";


    }
}

void fnLog()
{   
 char data = 'b';
fnMainMenu(data); // call Main Menu and I want to pass "hello"
}





/******************************************************************************
* Function: fnMainMenu
* Description: Menu for the customer 
******************************************************************************/
void fnMainMenu(char s)
{   
     cout &lt;&lt; s;

if (s == 'a')
{ cout &lt;&lt; "a = admin";
}
else
{cout &lt;&lt; "\n\nb not admin";
}

    //system("cls");
    int chooice = 0;

    cout&lt;&lt;"\n\t=======================";
    cout&lt;&lt;"\n\tWelcome\n";
    cout&lt;&lt;"\t=======================\n\n";
    cout&lt;&lt;"1. Manage employee\n";
    cout&lt;&lt;"2. Search employee\n";
    cout&lt;&lt;"3. Employee report\n";
    cout&lt;&lt;"4. Reset password\n";
    cout&lt;&lt;"5. Exit system\n";
    cout&lt;&lt;"\n &gt;&gt; ";
int numbers = 2;
    cin&gt;&gt;chooice;
    cin.clear();
    cin.ignore(numeric_limits&lt;streamsize&gt;::max(),'\n');

    switch(chooice){
        case 1 : 
            fnUpdateSalary();
            break;
        case 4 : 
        //  fnChangePassword();
            break;          
        default : exit(1);

    }
}


/******************************************************************************
* Function: main
* Description: The main calling function
******************************************************************************/
int main()
{   

    fnLog();
    return 0;
}
</code></pre>

<p><code>fnLog()</code> send <code>b</code> to <code>fnMainMenu()</code>. When I am at <code>fnUpdateSalary()</code> I want to go to <code>fnMainMenu()</code> again. My question is, is there anyway from <code>fnUpdateSalary()</code> or whatever function available to call <code>fnMainMenu()</code> without declaring variable <code>data</code> again? I was hoping I could just use <code>fnMainMenu();</code> instead of     </p>

<pre><code>char data = 'r'; fnMainMenu(data);
</code></pre>

<p>I get this error <code>error C2660: 'fnMainMenu' : function does not take 0 arguments</code> if I just called <code>fnMainMenu();</code></p>

<p>I hope my question make sense. Thanks in advance.</p>
