How do I send value from one function to another?
I have this example:
/* Include files */
#include <iostream>
#include <string>
#include <limits>
#include <sqlca.h>
#include <sqlcpr.h>
#include <iomanip>
#include <conio.h> // ntuk password masking
/* Declaration of functions and constants used */
#include "Functions.h"
using namespace std;
void fnMainMenu();
void fnLogin()
{
char data[6] = "hello";
fnMainMenu(); // call Main Menu and I want to pass "hello"
}
void fnMainMenu()
{
cout << "I want to display hello here?";
}
int main()
{
fnLogin();
return 0;
}
How do I do this? The tutorial I found from the net explained showing data on main. Thanks in advance.