1 How can I pass a variable char to a function.
2 How can I return a variable char in the return of a function.
In this example is better explained, thanks!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
char Hello();
int main()
{
char texto[1000];
cout << "Text:" << endl;
cin >> texto;
Hello(); //Here I want to pass the variable "texto"
system("pause");
return 0;
}
char Hello()
{
cout << texto; // here I want to be able to print the variable "texto"
return texto; // here I want to be able to return the variable "texto"
}
constchar * Hello( constchar *texto )
{
cout << texto; // here I want to be able to print the variable "texto"
return texto; // here I want to be able to return the variable "texto"
}