tomzie
March 7th, 2013, 08:40 PM
Hi, I have the following code. What is wrong with my declaration.
I am getting deprecated conversion from string constant to char *
int getchoice(char *greet, char *choices[]);
char *main_menu[] = {
"Choice 1",
"Choice 2",
"Choice 3",
0,
}; // i get the error here...
int main()
{
int choice;
choice = getchoice("Options: ", main_menu);
return 0;
}
int getchoice(char *greet, char *choices[])
{
// function codes here...
}
I am getting deprecated conversion from string constant to char *
int getchoice(char *greet, char *choices[]);
char *main_menu[] = {
"Choice 1",
"Choice 2",
"Choice 3",
0,
}; // i get the error here...
int main()
{
int choice;
choice = getchoice("Options: ", main_menu);
return 0;
}
int getchoice(char *greet, char *choices[])
{
// function codes here...
}